I am using to run a test. One of the “rest” requests keeps failing ever other request so I added a while controller to handle this issue:

${__javaScript(("${success}".indexOf("token_expiration_date") == -1 && ${Auth_2} < 3),)}

I captured part of the success response with a Regular Expression and added a counter so the while controller will run only 2 times for the same request.

Auth_2 –> Counter Reference name …..
success –> Regular Expression …..
token_expiration_date –> part of success response

My script runs fine if I get a success response, but otherwise, the will exit after the second request as defined in the counter and start over again in an loop. Below is part of the test result in the latter case.

Why is my loop restarting after the second request?

enter image description here

enter image description here

Source link https://sqa.stackexchange.com/questions/26875/-in-endless-loop-in-jmeter


Please enter your comment!
Please enter your name here