I have been using JMeter in GUI mode for composing all the test cases required for load testing my service but for actual testing I need to execute tests in non-GUI mode. How do I save the results of Aggregate report in csv file using command-prompt.
Thanks in advance.
Download JMeterPluginsCMD.
Move jmeter-plugins-manager-0.13.jar into /bin/libs/ext of your JMeter.
./JMeterPluginsCMD.sh --tool Reporter --generate-csv test.csv --input-jtl input.jtl --plugin-type AggregateReport
1. Save result file
Specify a result file to saved into in View Results Tree or View Table Results (in CSV or XML). Ex:
out/test-results.csv
or with CLI argument-JTEST_RESULTS_FILE=out/test-results.csv
2. Convert to report
Convert the result file into an aggregate report:
If you use
brew
, CMDRunner is located at:Just as alternative: you may do this directly from the Aggregate Report listener.
1. set filename/template for results file:
2. configure Aggregate Report listener as shown below:
CSV-file generated in this case will differ from generated via GUI/"Save Table Data" one.
If it is not acceptable you'll better use method with JMeterPluginsCMD from previous answer:
With the help from the above answer, I wrote a simple bash script to automate the work of generating aggregated result
.csv
file using.jtl
filesYou can put this script in the folder where
.jtl
files are in , and just run the script in that directory. Then, it will put all the aggregated reports(.csv
files) in theaggregate_report
directory in the same directoryUse JMeterPluginsCMD tool with Plugin Type = AggregateReport