user4925383
user4925383

Reputation:

Saving JMeter results in JTL/XML format

I'd like JMeter to save requests/responses to XML file ONLY if the request failed. All passed request should not be logged. How can I do that?

Upvotes: 1

Views: 3137

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

In order to store response data for failed requests all you need is just to add the next 2 lines to user.properties file (lives under "bin" folder of your JMeter installation)

jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data.on_error=true

In regards to saving requests, I'm afraid you have only 2 choices:

  1. save all requests (no matter of pass/fail status)
  2. save nothing

Theoretically it can be worked around using scripting-enabled test elements like Beanshell Listener in combination with Sample Variables or patching JMeter source code, but there is no out-the-box flag to trigger conditional storing of request data.

See Apache JMeter Properties Customization Guide for more information on JMeter properties types and ways of setting/overriding them

Upvotes: 2

Related Questions