0

I have multiple thread groups which are executing in parallel. I need to have a test plan in which if response time crosses 6 sec for any of the sample for any thread group, it should fail the sample, stop it and move on to the next sample.

Any inputs would be highly appreciated!

vsingh
  • 125
  • 1
  • 2
  • 16

1 Answers1

2

There are 2 possibilities:

  1. Duration Assertion which is capable of failing the request if it took longer than the defined threshold.

    enter image description here

    note that JMeter will still wait for the response and if the server fails to respond - JMeter might wait forever

  2. Response Timeout - lives at "Advanced" tab of the HTTP Request sampler (or even better HTTP Request Defaults)

    enter image description here

    if the server will not start responding within the given time frame - JMeter will mark the sampler(s) as failed not waiting for the request completion

Feel free to use any of above approaches or combination of them.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks a lot Dmitri for your quick response! 2nd option won't be applicable as I am using JDBC as my sampler which doesn't have the required advanced option. I tried duration assertion and not sure if that's how it's supposed to work. I put an assertion for 400ms, but still in the report, I could see transaction reaching 900ms as maximum. – vsingh Feb 28 '19 at 16:01