1
votes

I have made these settings in my jmeter.properties file to save my response data when there is a failure

jmeter.save.saveservice.output_format=xml

#jmeter.save.saveservice.response_data=false

jmeter.save.saveservice.response_data.on_error=true

So with these settings i was able to save the responses and view them using jtl file after i run the script from non gui But the problem is with this setting jmeter.save.saveservice.output_format=xml i am unable to generate html report I wanted to generate html report with response body..can someone please help me out

1

1 Answers

1
votes

As of JMeter 5.3 you cannot generate HTML reporting dashboard from .jtl files in XML format, according to the documentation:

The dashboard generator is a modular extension of JMeter. Its default behavior is to read and process samples from CSV files to generate HTML files containing graph views. It can generate the report at end of a load test or on demand.

The easiest way of getting the response data into the HTML reporting dashboard is artificially failing the sampler(s) via JSR223 Assertion and setting assertion failure message to be current sampler's response data, example code:

AssertionResult.setFailure(true)
AssertionResult.setFailureMessage(prev.getResponseDataAsString())

You will be able to get something like:

enter image description here

If this solution is not acceptable you can amend the report-template to represent whatever you want (the knowledge of Java and Freemarker will be required)