I have this postman logic:
var returnData = JSON.parse(responseBody);
tests["status code"] = (responseCode.code === 401);
if (responseCode.code === 401) {
postman.setNextRequest("get token with good login");
}
Even though status code is 401, that "setNextRequest" never get executed.
I am new to postman so maybe I am making a mistake somewhere?
Appreciate any pointer as to how I can chain this test and have it go onto to the next one?
thanks
-vincent
I have this postman logic:
var returnData = JSON.parse(responseBody);
tests["status code"] = (responseCode.code === 401);
if (responseCode.code === 401) {
postman.setNextRequest("get token with good login");
}
Even though status code is 401, that "setNextRequest" never get executed.
I am new to postman so maybe I am making a mistake somewhere?
Appreciate any pointer as to how I can chain this test and have it go onto to the next one?
thanks
-vincent
Share Improve this question asked Oct 12, 2016 at 17:36 Vince YauVince Yau 5551 gold badge5 silver badges17 bronze badges 2- Is the API working if you use POSTMAN plugin? – Ali Gajani Commented Oct 12, 2016 at 18:22
- Thanks for your reply. I am using Chrome app version. Is that the plugin that you are referring to? – Vince Yau Commented Oct 12, 2016 at 18:26
1 Answer
Reset to default 23I figured out what's wrong. I need to run the sequences in "Runner". I was merely pressing "Send" beforehand.
Thanks for your reply.