Skip to content
Arnaud Castaner edited this page Apr 22, 2015 · 3 revisions

To use Harhar you will need one or more .har files. As of version 1.0.3 only files generated by Google Chrome are fully supported (Firefox support through Firebug needs to be patched in).

Generating .har files

To generate a .har file in Chrome, open the Developer Tools (CTRL + Shift + I) and click on the “Network” tab:

Then simply browse to the web page you want to capture – the resources will show up in the console. For instance, browsing to http://www.spirent.com:

(Note that there are 9 errors, some of them 404 – Not Found status codes. Harhar will ignore responses that are not in the 200-300 status code range).

Once you have all these resources logged into Chrome, simply right-click and choose “Save as HAR with Content.” The “with Content” part is very important because we use that content to reconstruct the file (so you can put it on the Avalanche web server):

Save that file in some directory of your convenience, for instance E:\har. Then download Harhar and extract it in the same directory, like so:

Using Harhar

When you invoke Harhar without parameters, it will look for .har files in the current directory (not recursively). If no file is found you will get this message:

No file found in working directory.
Parsing complete. Press any key to exit.

You can also specify a directory as a parameter of harhar.exe, and Harhar will look into that directory for .har files:

E:\har>harhar.exe e:\har\files
Total Response size: 1215418 bytes (headers: 17192; bodies: 1198226)
Total Request size: 28943 bytes (headers: 28943 ; bodies: 0 )
Found 64 entries in log.
Creating working directory at E:\har\3-28-2014_9-43-10\www.spirent.com.har\

If you specify a directory and there is more than one .har file in that directory, Harhar will parse all the files. If you want to force Harhar to parse only one file, specify it explicitly:

E:\har>harhar.exe e:\har\files\www.spirent.com.har
Total Response size: 1215418 bytes (headers: 17192; bodies: 1198226)
Total Request size: 28943 bytes (headers: 28943 ; bodies: 0 )
Found 64 entries in log.