I am trying to use some conditional routing to skip a request in a collection based on whether certain variables are present earlier in the sequence. In the post-request script, we check for the presence of the variable, and then very simply either route to the next request in the sequence or the n+1 request.
For some reason, when I run this in the manual collection runner, the runner just stops after the request containing the conditional routing, and I can’t figure out why. If I comment out the conditional routing, everything runs smoothly, but using setNextRequest seems to be breaking the flow.
Is this expected behavior in the manual collection runner?
Here is pseudo code from the post-request script. There are no syntax errors in the actual code, and no errors are thrown in the request when we run the collection, it just stops moving to the next request:
//Inside "Request 1"
const resp = pm.response.json();
if (resp.success === true) {
pm.execution.setNextRequest('request-3-ID');
} else {
pm.execution.setNextRequest('request-3-ID');
}