Problem:
What are the steps for HTML report generation in JMeter? OR How to generate an HTML report in JMeter?
Solution:
Follow the below steps for HTML report generation in JMeter:
For JMeter 5.1.1 version or higher:
To generate the report in Non-GUI mode, execute the test using the below command:
a. For Windows:
jmeter -n -t <test JMX file path> -l <test log file path> -e -o <Path to output folder>
b. For Linux:
./jmeter.sh -n -t “<test JMX file path>” -l “<test log file path>” -e -o “<Path to output folder>”
The output folder contains the generated report in HTML format at the end of the test.
To generate the report in GUI Mode:
- In the main menu, go to Tools -> Generate HTML Report
- Provide the ‘Result file’ path, ‘user.properties’ file path and ‘Output directory path and click ‘Generate report’.
Note: Use the same ‘user.properties’ file to generate the report used during test execution otherwise report generation may throw an error. - A dashboard report will be generated and saved in the provided output folder at the end of the test.
For JMeter 3.0 to JMeter 5.0 version:
- Copy the properties from reportgenerator.properties into the user.properties file. If required, you can modify the properties as per your need.
- Use the following command to execute the test. Dashboard report will be generated and saved in the provided output folder at the end of the test:
For Windows:
jmeter -n -t <test JMX file path> -l <test log file path> -e -o <Path to output folder>
For Linux:
./jmeter.sh -n -t “<test JMX file path>” -l “<test log file path>” -e -o “<Path to output folder>”
For lower than JMeter 3.0 version
Dashboard Report Generation functionality is not available in the JMeter version lower than 3.0.
Advantages of JMeter HTML Report:
- The report in HTML format provides a better view of graphs and results.
- Graph properties allow exporters to overwrite some graph data.
- Filters can be applied to the graph
- A variety of graphs is available.
- The zoom-in feature helps to analyse the graph more closely.
- The main advantage is that you can share the HTML report with your client by zipping the report folder.
You may be interested:
- Performance Testing Tutorial
- Performance Engineering Tutorial
- Micro Focus LoadRunner Tutorial
- NeoLoad Tutorial