Sometimes when we write performance reports, we need some performance maps, and jmeter are the ones that can generate HTML performance reports.
First, the preparatory work
1: Support dynamic generation of test reports afterjmeter3.0 version
2:JDK version 1.7 or above
3: Jmx script file required
Second, the basic operating procedures
First, execute the cmd command: Enter the JMeter installation directory in the bin directory
Input command: jmeter -n-t directory test.jmx- l result.jtl -e-o directory/tmp/resultreport
For a chestnut: jmeter-n-t D:\apache-jmeter-3.2\bin\yqjr.jmx -L result.jtl -e-o D:\apache-jmeter-3.2\bin \httpreport
Parameter description:
-N: Non-GUI mode execution JMeter
-T: the location where the test files are executed
-L: Specifies the save file for generating test results, JTL file format
-E: Test report is generated when the test is finished
-O: Specify where test reports are stored
Description
In this command, the first place is marked with my interface script and path, the second is the auto-generated JTL file, the third is the report folder path is thick,
This section command executes the command under CMD (Note that CMD must be executed under the script file path , or you need to perform a switchover path under cmd)
Attention:
The end of the Resultreport is the report folder that you manually created. The folder contents must be emptied with the jtl file each time the command is started
Iii. Success Chart of implementation results
Iv. Viewing reports
In the generated directory, look for the. HTNL Open
The report of the Sheng sang is as follows:
Five, eggs OH
Before considering each execution of the command must go to the directory to empty the report folder and JTL, but also to hit the command, very annoying, and then think of a method, that is to write a bat, each time the bat is executed automatically to clear the previous report, and then execute the command
The command is as follows:
DEL/S/q D:\apache-jmeter-3.2\bin\result.jtl Delete result.jtl file
RD/S/q D:\apache-jmeter-3.2\bin\HttpReport Delete httpreport folder
MD D:\apache-jmeter-3.2\bin\HttpReport rebuilding Httpreport folder
Chestnuts:
Today's article to the end, is not to learn a trick to follow me at any time update ...
JMeter Generating HTML performance reports