Reputation: 486
I want to create a controller that should run a till the condition fails. How it can be implemented in Jmeter.
The controller should contain a HTTP Request with a post body which is dynamic the request should continue till the condition fails,but i dont know where the should i apply that condition.
{
"access": {
"identifier": "9876f",
"Reproduce": "Right",
"possible": {
"id": "u7ur038",
"value": "Move"
}
}
}
If the response "Reproduce"
contain "Right"
then it should run again HTTP Request for new body and If the response "Reproduce"
contain "Wrong"
then it should stop executing.
Upvotes: 1
Views: 52
Reputation: 34566
You can use a While Controller which will contain your request.
Condition of While Controller will be:
${__jexl3("${response}" != "Wrong")}
Add as child of your HTTP Request a JSON Extractor:
To reset variable for next thread loop iteration, add before While Controller a Flow Control Action and put inside it a preprocessor called User Parameters .
Click « Add Variable » and set :
Upvotes: 1