HAR to JMX File

Google Chrome Developer mode provides a method of seeing and capturing the network traffic within the browser. Google also provide the facility to convert this activity into a HAR file which can be used by many applications which would enables reply of the activities.

Apache JMeter does not have native support for HAR files. However, Blazemeter have provided a method of converting the HAR to a JMX file.

Capture HAR File

  1. Open Google Chrome

  2. Enter Developer mode using the key combination “CTRL + Shift + I”

  3. Navigate to “martkos-it.co.uk”

  4. Click on “Our Work”

  5. Click on “Our Services”

  6. Click on “Company”

  7. Click on “Blog”

  8. Click on “Contact”

  9. Right click on one of the page names and select “Save all with HAR as content”.

  10. Then save the filename as “martkos-it.co.uk.har”

Convert HAR file to JMX

  1. Open Google Chrome

  2. Navigate to https://converter.blazemeter.com/

  3. Click “Choose File” button and click Convert.

  4. Then Click Download JMX File

Use JMX File

  1. Open JMeter

  2. Open martkos-it.co.uk.jmx

  3. The Test Plan contains all of the requests including cookies and headers.

  4. Of course you can achieve a vary similar result using the JMeter Recorder but this another method of trapping the network traffic that eventually forms out test plan.

Note

Unfortunately, you cannot save a filtered Google Chrome HAR so you will get a JMX file with a raw recording. This includes additional attributes shown here. However, given you know what requests to target you can quickly remove the additional attributes from the test plan.

FURTHER READING

What is a HAR file?

Previous
Previous

Dummy Sampler

Next
Next

Fiddler Everywhere