Luiz Guilherme
Luiz Guilherme

Reputation: 1621

Is it possible to run a HAR archive on google chrome?

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?

Upvotes: 21

Views: 10990

Answers (3)

martin
martin

Reputation: 990

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

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

Upvotes: 0

igrigorik
igrigorik

Reputation: 9591

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).

Upvotes: 4

Astaar
Astaar

Reputation: 6548

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.

Upvotes: -2

Related Questions