Hello All,
In this blog, we will see how we can generate the report for our load testing.
Please follow the below steps,
Step 1:
Open your command prompt and make sure that you are inside the bin folder before run your Load Test Script
Run the test in non GUI mode and save the report as csv
or jtl
format.
Windows:
Syntax for running the Script in Command prompt:
jmeter -n -t [path to test JMX file] -l [path to result file] |
-n : This specifies JMeter is to run in non-gui mode
-t : name of JMX file that contains the Test Plan
-l : name of JTL file to log sample results to.
Example:
jmeter -n -t C:\jmeter\gen-report.jmx -l C:\jmeter\gen-report.jtl |
Unix (MacOS, Linux, etc.):
./jmeter.sh -n -t [path to test JMX file] -l [path to result file] |
Example:
./jmeter.sh -n -t /Users/user/jmeter/gen-report.jmx -l /Users/user/jmeter/gen-report.jtl |
No matter what the extension of result file is .csv
or .jtl
. Both of them should work.
Step 2: Use the following command to generate report from an existing sample CSV/JTL result file as above.
Windows:
jmeter -g [path to result file] -o [path to report output folder] |
-g : [path to CSV file] generate report dashboard only
-o : output folder where to generate the report dashboard after load test. Folder must not exist or be empty
Example:
jmeter -g C:\jmeter\gen-report.jtl -o C:\jmeter\report |
Unix (MacOS, Linux, etc.):
./jmeter.sh -g [path to result file] -o [path to report output folder] |
Example:
./jmeter.sh -g /Users/user/jmeter/gen-report.jtl -o /Users/user/jmeter/report |
After run the script you can open the folder which you have mentioned while running the script & you can see the report has been generated.
Open the Index.html file and you can see your load testing consolidate report.
The reports will contain the detailed information about the request, response, pass and failure error, complete graph information.
Please post the comment If you are facing any issue.