JMeter is an open-source load testing tool. See related posts if you want more information about JMeter. JMeter allows to record HTTP traffic with its built-in HTTP(S) Test Script Recorder. OctoPerf natively supports importing JMeter recordings.
First, you need to install JMeter on your computer:
- Get JMeter from JMeter Download Page,
- Decompress the archive,
- Run JMETER_HOME/bin/jmeter executable (extension depends on your OS).
JMeter GUI should appear. JMeter is a Java program, it requires a Java JRE. Install one if you don’t have any.
To record HTTP traffic with JMeter, we have prepared a JMX project:
- Download our JMX project,
- Launch JMeter,
- Open the JMX project by clicking on File > Open in the top left menu,
- Select the file on your disk,
- Click on Http(s) Test Script Recorder,
- Click on Start button in the right panel, at the bottom.
JMeter is now capturing HTTP traffic. It’s time to launch your web browser to begin generating traffic. But first, we need to configure the proxy settings on that browser. In this project, the proxy runs on localhost, port 1234.
The screenshot below shows how to configure proxy settings on Firefox:
- Open Firefox,
- Go to the Preferences,
- Click on the Advanced tab,
- Select Network tab,
- In the Connection section, select Settings…,
- Select the Manual proxy configuration radio button,
- Set HTTP Proxy to localhost and Port to 1234,
- Check Use this proxy server for all protocols
- Click on OK and exit the menu.
Now browse your web application in your browser.
JMeter should capture HTTP traffic inside the Recording Controller. Once you are finished, stop the recorder and save the project. The screenshot above shows a sample record of our Homepage.
HTTPS Traffic Capture
HTTPS traffic recording is a little more cumbersome. JMeter is able to record HTTPS traffic by generating SSL certificates on the fly per domain. You need to import the JMeter’s Root Certificate Authority inside your browser to enable HTTPS traffic capture.
You will find a more complete tutorial on how to record HTTP and HTTPS traffic for JMeter.
Upload JMX to OctoPerf
You now have a capture of your web application. To create a virtual user from a JMeter JMX recording:
- Log in on our Cloud Load Testing Tool,
- Click on Create a VU,
- Select Import JMX,
- Upload the saved JMeter JMX file.
You should see the import virtual user within seconds. You are ready to run load test on our Cloud platform to simulate what you recorded.
You may encounter issues recording your web app with JMeter, here are some tips:
- JMeter is recording nothing: make sure you have started the recorder. Check that the browser is configured with the JMeter proxy settings,
- HTTPS websites are failing to load: if you see something like Invalid SSL Certificate inside your browser, you probably forgot to import the JMeter CA Certificate.
If you still experience issues recording and importing JMeter JMX on our platform, we would be glad to help you.
You can now enjoy editing your JMeter JMX online, via our Web interface. OctoPerf is powered by JMeter to provide a full JMeter Cloud experience. We’re providing the world’s first JMeter web interface.