9

I would like to save table data generated by an aggregate report using command line, so that I can automate the process. However, I read from an older post around 2004 using 2.2/2.3 jmeter that this cannot be done. But since it is 2014 now and we are using jmeter 2.11, I was wondering if we could save the table data.

The button boxed in red is what I am trying to do but with command line rather than with the GUI.

enter image description here

Thanks

Aliaksandr Belik
  • 12,725
  • 6
  • 64
  • 90
user3235731
  • 105
  • 1
  • 1
  • 7
  • 1
    Well, what about at least this solution: http://stackoverflow.com/questions/7990863/how-to-save-jmeter-aggregate-report-results-to-a-csv-file-using-command-prompt ? – Aliaksandr Belik May 13 '14 at 15:53
  • The solution only works for the aggregate report responses rather than the save table data. They have some similarities, but not the main details that I need. – user3235731 May 13 '14 at 16:55
  • For jmeter-4.0 have a look at [this answer](https://stackoverflow.com/a/49555659/4067213) to a similar thread. – christian_de Mar 29 '18 at 12:19

1 Answers1

7

In order to achieve this you will have to write a batch script (windows) and shell script (Linux).
Please follow the below mentioned steps:

  • Run Jmeter via command line and specify path for output *.jtl file
  • Call CMDRunner.jar in your Jmeter \lib\ext directory to convert *.jtl file to Aggregate report and save as CSV file.
  1. jmeter -n -t "C:\Test.jmx" -l "C:\output.jtl" ^&^& exit
  2. java -jar CMDRunner.jar --tool Reporter --generate-csv "C:\Aggregate_Report.csv" --input-jtl "C:\output.jtl" --plugin-type AggregateReport
  • Run your *.bat or *.sh file

Hope this will help.

Zubair M Hamdani
  • 1,693
  • 1
  • 13
  • 14
  • 2
    Worth noticing that this approach requires http://jmeter-plugins.org/wiki/JMeterPluginsCMD/ which is bundled in http://jmeter-plugins.org/wiki/StandardSet/ – Alex V Mar 31 '15 at 23:22
  • How can we do it using Java code? I mean write a piece of code and run it after mvn test -D, something like this and do not use `.bat` file at all. – paul Oct 03 '18 at 07:43