I want to create JMeter script in which some API calls are made only after the response to the API calls which it is dependent upon is received successfully. Is it possible in JMeter? And if yes then please let me know how?
To determine whether previous sampler was successful or not you can use If Controller and the following condition:
- Request 1
- If Controller with the above condition
- Request 2
- Request 3
Assuming the above configuration
Request 2will be executed only if
Request 1is successful.
Request 3will be executed always
In regards to adding a delay between requests there are 2 ways: