Convert HAR files to JMeter test plans

Any seasoned performance and automation tester will be aware the Number One Myth, that record & playback is rarely an accurate representation of user behavior. There is no such thing as a script-less process. Performance testers need to understand the sometimes complex chain of requests and responses their web application makes, most likely at the protocol level. It would be foolish to think otherwise.

However a recorded script is a great starting point for those cognizant of this fallacy. Recordings can save you a lot of time, particularly around preparation of complicated forms and parameters. That's why we've created a HAR to JMX online converter at flood.io/har2jmx

Recording HAR files

Forget about proxy recorders and nuisance SSL certificates. You already have a powerful tool right in front of you. Your browser!

.har is a common filename extension denoting an HTTP Archive file. It is a JSON-formatted file that contains a trace of your web browser's interaction with a given site. Most modern browsers such as Chrome and Firefox have the ability to record network activity and export the trace as a HAR file or copy its contents to the clipboard.

See below for a quick demonstration of tracing network requests and responses via Chrome for our own script challenge

Converting HAR files to JMX

Our flood.io/har2jmx will convert your copied HAR string into a JMeter formatted test plan (.jmx), saving you the hassle of creating it manually. It's easy to try, see below for a quick demonstration.

Open in JMeter

Once converted, just open the downloaded test plan in JMeter and resume editing. The converter will do things like automatically create POST parameters and detect if requests were made with XML HTTP Request Headers. Behind the scenes, we're just using our popular ruby-jmeter gem. It's all open source, so you could easily expand on the example here.

See below for a quick demonstration of the converted test plan.