Loyo Fernando
Loyo Fernando

Reputation: 193

How to stop thread If response assertion fails in Jmeter

I want to implement error handling in my script (like textcheck in LR).

I’m able to validate the Text using Response Assertion.

But my question is how to stop the thread if the Response Assertion (text check) fails.

Upvotes: 19

Views: 20575

Answers (2)

Joseph Moore
Joseph Moore

Reputation: 384

If you need to limit this behaviour to one request, add a Result Status Action Handler as a child of the request, then set it to Stop Thread

Upvotes: 9

user1696977
user1696977

Reputation: 366

In Thread group, choose Stop Thread under Action to be taken after a sample error. This will stop the test once assertion fails

Upvotes: 35

Related Questions