Tufty
Tufty

Reputation: 535

Jmeter - How do I see sampler data following running a test from Command line?

I have a test which I have successfully run manually and am confident that it runs correctly.

I am now converting it to run via linux command line by parameterising it.

The test completes successfully and I'm successfully storing the 'Results Tree' and on opening the stored 'Results Tree' file I can see all tests have passed.

However, I cannot see any of the sampler data, which is making me deeply suspicious that the tests are not actually being run, merely that the requests are being sent and returned with the correct return code.

I need to be able to prove that certain values are being extracted and tested.

I tried inserting a Beanshell Post Processor but this generated more warning and error messages than it provided useful information.

Any help greatly appreciated.

Upvotes: 0

Views: 414

Answers (1)

Dmitri T
Dmitri T

Reputation: 168122

This is by design, JMeter doesn't store response data to avoid disk IO overhead as in case of high loads and large responses it may be a bottleneck which will ruin your test.

If you need to enable it for some reason, you can add the next 2 lines to user.properties file (located in JMeter's "bin" folder)

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

JMeter restart will be required to pick the properties up.

Another way of one-time ad-hoc properties change is passing them via -J command-line argument like:

jmeter -Jjmeter.save.saveservice.output_format=xml -Jjmeter.save.saveservice.response_data=true -n -t test.jmx -l result.jtl

References:


UPD: if you need request data along with request and response headers:

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.url=true
jmeter.save.saveservice.responseHeaders=true

Upvotes: 1

Related Questions