I am setting the JMeter properties using JSR223 outside of WHILE controller like this -
if(jsonResponse.currentStatus == "Received")
{
props.put("pollCount", 0);
def requestId = jsonResponse.id;
props.put("requestId", requestId);
props.put("currentStatus",jsonResponse.currentStatus);
}
Then I am accessing these properties within "WHILE" Controller like this-
((("${__groovy(props.get('currentStatus'))}" == "Received") ||
("${__groovy(props.get('currentStatus'))}" == "Processing")) &&
(${__groovy(props.get('pollCount'))} < 24))
Within the WHILE Controller, I am making an HTTP request to recheck the "currentStatus". If it is "completed" then my idea is, I'll come out of the "WHILE" controller.
Similarly, I have an "IF Controller" within "While Controller". After making an HTTP call and checking the "currentStatus". Then I am resetting "props" properties. If "currentStatus" is "Received" or "Processing", I go inside "IF Controller", where I am providing a timer delay of 30 seconds with constant timer. In the "IF Controller", I am applying the condition like this -
(("${__groovy(props.get('currentStatus'))}" == "Received") ||
("${__groovy(props.get('currentStatus'))}" == "Processing"))
But it does not go inside the IF controller, even if the condition is "Processing".
The "While Controller" keep on processing infinitely even if the "currentStatus" is set to "Completed".
It seems that the conditions are not working for me. How can I fix it so that when "currentStatus" is "Completed", it comes out of the "WHILE Controller"?