2

When I running Jmeter in non gui mode Im getting response error in Jmeter Error sampler response

Im using below mentioned settings in the simple data writer in the script Simple data writer config

I want to know whether server under test has thrown this Non-text response data error or error is something else and Jmeter is not able to interpret it so it is showing that. Can someone help me understand this. Thank you!!!

Vaibhav
  • 29
  • 4
  • Hi Vaibhav, are you receiving this response for every request in the test plan. – Zohair Sep 26 '22 at 05:13
  • Hi Zohair, no only for the failed requests. I have marked data writer to only capture on error. Suppose if I get total 80 failed requests then out of those 80 for 50to60 requests i get this error. – Vaibhav Sep 26 '22 at 07:04

1 Answers1

0

This error will occur when SampleResult.getDataType() function returns anything other than text

You can try writing the response data using JSR223 Listener and some custom Groovy code, for instance:

if (!prev.isSuccessful()) {
    new File('response.bin').bytes = prev.getResponseData()
}

you can amend this response.bin filename to include the current thread number, iteration, name of the sampler and so on

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