Report Dashboard: extension modules provided after JMeter3.0, support for drawing graphs and statistics from the test plan, and generating graphical reports of HTML page formats.
Quick Start Demo
First, prepare the test plan Mock_api. jmx
Prepare a simple test plan, such as request an interface Http://10.1.102.75:8000/mock/api/jmeter, return {"Code": 1, "MSG": "OK"}
Ii. execute the test and generate the report at the end of the test
command-line format: jmeter-n-T <test JMX file>-L <test log file>-e-o <path to output folder>
" Mock_api. JMX " -l MOCKLOG.CSV-E-o/output
On the command line Execution command, the JMeter is executed in non-GUI mode, the generated test results are saved to mocklog.csv, and the HTML format test report is generated in the output folder after the test execution is complete. Open the index.html in the output folder with your browser to view the performance test report as follows:
Dashboard Basic Configuration
JMeter3.0 added a file in the bin directory to reportgenerator.properties
save all the default configuration of the graphical HTML report generation module, to change the configuration, it is recommended not to edit the file directly, but recommend in the user.properties
configuration and overwrite.
1. General Configuration
The general configuration is prefixed jmeter.reportgenerator.
with, for example: jmeter.reportgenerator.overall_granularity=60000
overall_granularity
: Define sampling point granularity, default is 60000ms, usually in tests other than stability, we may need to define finer granularity, such as 1000ms, we can add the following configuration at the end of the user.properties
file:
2. Chart configuration
Each chart configuration is prefixed with jmeter.reportgenerator.graph.
.
3. Output configuration
The output configuration is jmeter.reportgenerator.exporter
prefixed.
PS: detailed configuration, please check the official documentation: http://jmeter.apache.org/usermanual/generating-dashboard.html
Generate reports
Mode one: Generate reports from existing stress test CSV log files
file>-o <path to output folder>
Method Two: Generate a report at the end of the stress test
file file>-e-o <path to Output folder>
JMETER-02 JMeter Generating HTML performance reports