I am using JMeter to run a performance 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 loop will exit after the second request as defined in the counter and start over again in an endless loop. Below is part of the test result in the latter case.
Why is my loop restarting after the second request?