We have seen the HAR (Http ARchive) format as the output from the BrowserMob proxy implementation and the NetExport implementation. The HAR file contains a log with requests and responses to the server. The file can be displayed as a waterfall or as an expandable tree. This recipe shows a couple of ways to view the HAR format.
Make sure you gathered a HAR file from the application under test.
We will see how to view a HAR file by using an online viewer.
- Open the online HAR viewer, http://www.softwareishard.com/har/viewer/
- Copy and paste the contents of the HAR file into the textbox. We can also drag and drop the file from our file-system to the website.
- Press Preview, in case you copied the contents of the HAR file.
- The result will look like the image below:
What has been done
The online HAR viewer reads the HAR file and builds the waterfall diagram.
There are more ways to view the HAR files. This section will cover a couple of frequently used ways.
We have to follow a couple of steps before we can view a HAR file in Fiddler. The steps are described below:
- Download fiddler from the following website: http://www.fiddler2.com
- Install Fiddler on your local machine
- Click on File → Import Sessions… and select your import format
- Select the existing HAR file from your filesystem.
- All the details from the sessions are visible in Fiddler.
NetExport gives us the functionality to upload the HAR file to http://www.showslow.com/beacon/har/. The HAR file is now accessible from the internet and can be easily shared with others. It is even possible to install ShowSlow on a private server to limit the risk.