0

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 Answers4

0

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:

Convert XML file to CSV in java

Community
  • 1
  • 1
vins
  • 15,030
  • 3
  • 36
  • 47
0

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:

Simple Data Writer

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

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

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

Seamus
  • 4,539
  • 2
  • 32
  • 42