Apache JMeter is a pure Java open-source software for load testing or performance testing. This article describes two ways to look at using JMeter stress test conducted stress test report generation.
Preparing the Environment
Apache JMeter overview on the method of installation, the following can be found:
- https://liumiaocn.blog.csdn.net/article/details/101264380
Thread group setting information is listed below, in the present embodiment, this setting is saved as thread.jmx
a
As used herein, requests for Java JMeter own stress test examples to illustrate how to generate the test report, the detailed steps can see the following:
- https://liumiaocn.blog.csdn.net/article/details/101272019
The GUI generation
Use the following steps to generate a report
- Step 1: In the report output file name entered in the polymerization: /tmp/jmeter-test.jtl. Such implementation of the outcome document will be generated /tmp/jmeter-test.jtl after the test.
- Step 2: Click the green Start button to begin, and then click polymerization report you can see real-time information, after the execution can see the results of 36,000 times information is as follows:
- Step 3: Verify the results generated /tmp/jmeter-test.jtl file and generate test reports in this file.
Run: bin / jmeter -g /tmp/jmeter-test.jtl -e -o / tmp / jmeter-rpt-gui -j /tmp/gui-rpt.log
liumiaocn:apache-jmeter-5.1.1 liumiao$ ls -l /tmp/jmeter-test.jtl
-rw-r--r-- 1 liumiao wheel 2874933 Sep 26 05:00 /tmp/jmeter-test.jtl
liumiaocn:apache-jmeter-5.1.1 liumiao$ bin/jmeter -g /tmp/jmeter-test.jtl -e -o /tmp/jmeter-rpt-gui -j /tmp/gui-rpt.log
liumiaocn:apache-jmeter-5.1.1 liumiao$ ls /tmp/jmeter-rpt-gui/
content index.html sbadmin2-1.0.7 statistics.json
liumiaocn:apache-jmeter-5.1.1 liumiao$
- 1
- 2
- 3
- 4
- 5
- 6
- Step 4: Results of confirmation
can be seen that the result of the command line generated under / tmp / jmeter-rpt-gui directory, click index.html you can see the results of this report is based on a report generated sbadmin
Non-GUI mode generation
Use the following steps to generate a report
- Step 1: Use thread.jmx files -n non GUI run jmeter pressure testing, and generate results jtl file, specific commands as follows:
执行命令:bin/jmeter -n -t /tmp/thread.jmx -l /tmp/jmeter-test-nongui.jtl -j /tmp/gui-rpt.log
- 1
Execution results are as follows:
liumiaocn:apache-jmeter-5.1.1 liumiao$ bin/jmeter -n -t /tmp/thread.jmx -l /tmp/jmeter-test-nongui.jtl -j /tmp/gui-rpt.log
Creating summariser <summary>
Created the tree successfully using /tmp/thread.jmx
Starting the test @ Thu Sep 26 05:23:23 CST 2019 (1569446603749)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary + 2328 in 00:00:06 = 391.3/s Avg: 227 Min: 101 Max: 359 Err: 0 (0.00%) Active: 100 Started: 100 Finished: 0
summary + 12937 in 00:00:30 = 431.2/s Avg: 231 Min: 100 Max: 359 Err: 0 (0.00%) Active: 100 Started: 100 Finished: 0
summary = 15265 in 00:00:36 = 424.6/s Avg: 231 Min: 100 Max: 359 Err: 0 (0.00%)
summary + 13155 in 00:00:30 = 438.5/s Avg: 227 Min: 100 Max: 359 Err: 0 (0.00%) Active: 100 Started: 100 Finished: 0
summary = 28420 in 00:01:06 = 430.9/s Avg: 229 Min: 100 Max: 359 Err: 0 (0.00%)
summary + 7580 in 00:00:20 = 377.8/s Avg: 228 Min: 100 Max: 359 Err: 0 (0.00%) Active: 0 Started: 100 Finished: 100
summary = 36000 in 00:01:26 = 418.5/s Avg: 229 Min: 100 Max: 359 Err: 0 (0.00%)
Tidying up ... @ Thu Sep 26 05:24:50 CST 2019 (1569446690067)
... end of run
liumiaocn:apache-jmeter-5.1.1 liumiao$
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Step 2: Make sure the results generated /tmp/jmeter-test.jtl file and generate test reports in this file.
Run: bin / jmeter -g /tmp/jmeter-test-nongui.jtl -e -o / tmp / jmeter-rpt-nongui -j /tmp/gui-rpt.log
Execution results are shown below
liumiaocn:apache-jmeter-5.1.1 liumiao$ bin/jmeter -g /tmp/jmeter-test-nongui.jtl -e -o /tmp/jmeter-rpt-nongui -j /tmp/gui-rpt.log
liumiaocn:apache-jmeter-5.1.1 liumiao$ ls -l /tmp/jmeter-rpt-nongui/
total 32
drwxr-xr-x 5 liumiao wheel 160 Sep 26 05:26 content
-rw-r--r-- 1 liumiao wheel 9477 Sep 26 05:26 index.html
drwxr-xr-x 7 liumiao wheel 224 Sep 26 05:26 sbadmin2-1.0.7
-rw-r--r-- 1 liumiao wheel 796 Sep 26 05:26 statistics.json
liumiaocn:apache-jmeter-5.1.1 liumiao$
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- Step 3: The results confirmed that
it was confirmed that the generated report information as shown below
to sum up
This article describes common methods to generate test reports in JMeter, the next article will continue to introduce details of the test report.