I want to convert .jtl file into csv from post execution of JMeter java code.Please help to fix this problem. I am looking for Java code so I can convert the jtl file into csv.
4 Answers
1) You can change this property of JMeter jmeter.save.saveservice.output_format
to csv
to generate the result file in csv format. That would be much easier & consumer less memory.
2) You can use this jmeter plugins to generate reports in csv format - http://jmeter-plugins.org/wiki/JMeterPluginsCMD/
3) XML to CSV conversion:
JMeter output results format defaults to csv, if it is not the case you can "tell" JMeter to store results in CSV format. To do so, add the following line to jmeter.properties file (it is located under /bin folder of your JMeter installation)
jmeter.save.saveservice.output_format=csv
If you need this one-time only, you can pass the property via -J command-line argument like
jmeter.bat -Jjmeter.save.saveservice.output_format=csv -t /path/to/your/script.jmx ...
See Apache JMeter Properties Customization Guide for extended information on different JMeter properties types and ways of working with them.
Be aware that in case of CSV output format you won't be able to save request and response data.
Another option is adding Simple Data Writer listener. Relevant configuration to store default KPIs will look like:

- 159,985
- 5
- 83
- 133
Folks thanks for your answers but I have configured conversion of jtl file into csv file without using your solutions actually I have done a mistake in the java code I have to define .csv file while saving the logs instead of .jtl.
However many thanks for replying on this post.

- 1
- 3
Open the .csv
or .jtl
file in JMeter GUI Listener, and save it to the required format.

- 4,539
- 2
- 32
- 42

- 1
- 3