Complete the code to set the next request to run in Postman.
pm.setNextRequest([1]);Use pm.setNextRequest('RequestName') to specify which request runs next.
Complete the code to stop the collection run after the current request.
pm.setNextRequest([1]);Passing null to pm.setNextRequest() stops the collection run.
Fix the error in the code to conditionally run the next request only if status code is 200.
if (pm.response.code === 200) { pm.setNextRequest([1]); } else { pm.setNextRequest(null); }
The next request name must be a string in quotes inside pm.setNextRequest().
Fill both blanks to run 'Login' first, then 'GetData' only if login succeeds.
if (pm.response.code === 200) { pm.setNextRequest([1]); } else { pm.setNextRequest([2]); }
If login succeeds (status 200), run 'GetData'. Otherwise, stop the run with null.
Fill all three blanks to create a loop that runs 'CheckStatus' until status is 200, then stops.
if (pm.response.code !== 200) { pm.setNextRequest([1]); } else { pm.setNextRequest([2]); } // Log the current request name console.log([3]);
If status is not 200, repeat 'CheckStatus'. Otherwise, stop the run. The current request name is logged using pm.info.requestName.