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.
- jmeter -n -t "C:\Test.jmx" -l "C:\output.jtl" ^&^& exit
- 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.