If controller example to control which request to send based on response of the other sampler.
We’re using Dummy Sampler to generate requests.
We also need to extract response’s code. We can use Regular Expression Extractor to get it:
- Field to check: Response Code
- Reference Name: RESPONSE_CODE
- Regular Expression: (\d+)
- Template $1$
First If Controller Condition
Second If Controller Condition
Setup Dummy Sampler to return code 200.
And now edit it to return something other than 200