0
votes

I am trying to get Jmeter output in JTL format so that I can utilize JMeter GUI to "View result tree" using "Read from file" option

I am running following command from cmd line

jmeter -Jjmeter.save.saveservice.samplerData=true -Jjmeter.save.saveservice.response_data=true -n -t nmame.jmx -l JmeterReports/TestReport.jtl

When I open the result file Testreport.jtl generated, I don't see request and response data. Can you please help me?

2

2 Answers

2
votes

You need to amend a little bit your command line in order to include some more properties responsible for the results file configuration like:

jmeter -Jjmeter.save.saveservice.output_format=xml -Jjmeter.save.saveservice.response_data=true -Jjmeter.save.saveservice.samplerData=true -Jjmeter.save.saveservice.requestHeaders=true -J jmeter.save.saveservice.responseHeaders=true -Jjmeter.save.saveservice.url=true n -t nmame.jmx -l JmeterReports/TestReport.jtl

In order to make the change permanent add the next lines to user.properties file (lives in "bin" folder of your JMeter installation)

jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.responseHeaders=true
jmeter.save.saveservice.url=true

More information: How to Save Response Data in JMeter

0
votes

You have chosen to include entities that are available only if the output format is XML.

Hence, include below as part of your argument list

-Jjmeter.save.saveservice.output_format=xml

items with (XML) only apply to XML format

Source: https://jmeter.apache.org/usermanual/listeners.html#sample_configuration

Reference Screenshot

enter image description here

You can still persist with .JTL file extensions for your log files and need not rename all of them to .XML. JMeter will still read the data and provide you with the necessary details


Hope this helps!