postman version:7.16.1
I am relatively new to postman scripting and am struggling with correct usage of setnextRequest… guidance is much appreciated. I have read the docs and several posts about it.
I have request A and request B. A is a “POST”, B is a GET".
The PreRequest script for B looks like this:
if {
postman.setNextRequest(‘Request A’)
}
I start collection runner and execute “Request B” only.
expected behavior:
Request B execution followed by Request A execution.
actual behavior:
B executes but fails with a 401 status. This 401 was expected.
A never executes
question
Why does A not execute? Is setNextRequest effective only if the currently executing request(B in my case) is successful?