Debug JMeter response errors using a JSR223 listener

Understand why you see unusual JMeter errors when running your test in Flood

The best option would be to debug under load by using a JSR223 listener with the following Groovy code:

if (prev.isSuccessful() == false) { "The Sample Label is : " + prev.getSampleLabel()) "The Start Time in milliseconds is : " + prev.getStartTime()) "The Response Code is : " + prev.getResponseCode() ) "The Response Message is : " + prev.getResponseMessage()) "Headers are: " + prev.getResponseHeaders()) }

When we recommended to use this option?

  • When the error rate is below 20%. We don't recommend you use this method if your error rate is 100%, as the problem should be obvious.

  • When the error is only happening under load. When the same problem happens locally with a single/few users, there is no need to use this method.

  • When monitoring live output logs for searching errors.

Last updated