问题
I wrote a script in the test tab to set an access token from the login request. After setting access token I want to call logout API to revoke my session or access token.
I have mentioned .setNextRequest("Requestname" i.e logout)
and logout request also included in that folder.
When I run all the folders in the collection runner, I get success to call login request and set access token but my .setNextRequest()
method is not working where I am passing the request name.
If we have to pass request ID then I am unable to identify request ID within that folder. Any useful suggestion would be appreciated.
Here is my script in the test tab of the login request.
var Jasondata = JSON.parse(responseBody);
var accessToken = Jasondata.payload.accessToken;
console.log(accessToken);
pm.environment.set("accessToken", accessToken);
postman.setNextRequest("7");
来源:https://stackoverflow.com/questions/57609395/postman-setnextrequest-unable-to-pass-request-id