Generating JMeter Test Reports via Command Line and Plugins
This guide explains how to use JMeter's command‑line mode and the JMeter Plugins CMD tool to convert JTL files into HTML reports and various chart types, detailing required parameters, plugin installation, and example commands for comprehensive performance‑testing reporting.
The article uses Apache JMeter 3.2 and demonstrates how to generate test reports and charts from JTL files.
1. Command‑line mode to convert JTL to a test report
Applicable to JMeter versions 3.0 and later. Execute the following command:
jmeter -n -t test_request.jmx -l test_result.jtl -e -o /home/csmijo/resultReport
Parameter meanings:
-n : non‑GUI mode
-t : path to the test plan (.jmx)
-l : output JTL file
-e : generate the HTML report after the test
-o : directory where the report will be created (must not already exist or must be empty)
To generate a report from an existing JTL file:
jmeter -g log.jtl -e -o resultReport
Parameters:
-g : existing JTL file
-e : generate report
-o : output directory
2. Plugin mode to create charts
Various chart plugins are available, such as AggregateReport, SynthesisReport, ThreadsStateOverTime, PerfMon, etc.
To use the plugins, download jpgc-cmd-2.1.zip from the JMeter Plugins site and place its contents into the JMeter bin directory. Additional required components include jpgc-filterresults-2.1.zip , jpgc-synthesis-2.1.zip , and the standard plugin set (e.g., jpgc-perfmon , jpgc-graphs-basic ).
Example commands:
JMeterPluginsCMD.bat --generate-png cpu.png --input-jtl cpu.jtl --plugin-type PerfMon
JMeterPluginsCMD.bat --generate-csv cpu.csv --input-jtl cpu.jtl --plugin-type PerfMon
After installing the necessary JAR files ( JMeterPlugins-Standard.jar and JMeterPlugins-Extras.jar ) into jmeter/lib/ext , you can batch‑generate all supported plugin charts using a script.
The article concludes with reference links to JMeter Plugins CMD documentation, performance testing tutorials, and JTL parsing resources.
360 Quality & Efficiency
360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.