21

Is it possible to a run a HAR file that was generated by chrome? I have exported a ajax request from chrome and changed a parameter and I want to run it again. I'm trying to debug using a problem on my site and this ajax request must be executed on the page context.

If it isn't possible, do you have other alternative for this?

Luiz Guilherme
  • 1,601
  • 21
  • 37
  • 1
    Not an answer (yet), but REST Console has 'HAR support' listed under 'Coming soon'. https://chrome.google.com/webstore/detail/cokgbflfommojglbmbpenpphppikmonn?hl=sv – Jonatan Littke Mar 01 '12 at 10:50
  • Are you aware of any chrome extension that can do this task? Practically it's possible – ganoro Aug 20 '12 at 08:02

3 Answers3

4

No, unfortunately Chrome cannot replay a session from a HAR file. To do that, you'll need to rely on a proxy which can feed the data to Chrome. To do so, you have a few options:

  1. https://github.com/chromium/web-page-replay

    Open source proxy solution which will record the session and then replay it to your browser. Even though the tool is not specifically designed to edit the data, you can adjust the resources to be served and let it feed the data back to the browser. Definitely more on the involved side, but the added benefit of this solution is that it will work with any browser (since it's just a proxy).

  2. Depending on your platform you can use Fiddler2 (Win), or something like Charles proxy (Mac). Both are proxies, but come with a nice GUI which will also allow you to intercept and modify the response on the fly (as well as export any session in HAR format).

Ninjakannon
  • 3,751
  • 7
  • 53
  • 76
igrigorik
  • 9,433
  • 2
  • 29
  • 30
0

Who about recording and replaying 2x the entire session using puppeteer? with and without the new param.

https://developers.google.com/web/tools/puppeteer

martin
  • 862
  • 9
  • 28
-2

A very high-end and widely used tool is Spirent's Avalanche load generator. A free tool called Harhar will convert a HAR file to an Avalanche-compatible test case and allow you to replay the file at very high loads (100,000's of times per second).

You can find the tool here: https://alarash.net/harhar

Fiddler is fine and everything but you're dependent on Windows' TCP stack, which isn't as flexible and doesn't offer as many performance as a dedicated, carrier-grade tool such as Avalanche.

Astaar
  • 5,858
  • 8
  • 40
  • 57