0
0
Postmantesting~20 mins

Run order and flow control in Postman - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Run Order Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Postman Collection Run Order Behavior
Given a Postman collection with three requests named A, B, and C, where B depends on a variable set by A, and C depends on a variable set by B, what is the order in which the requests run during a collection run?
AC runs first, then B, then A
BB runs first, then A, then C
CA runs first, then B, then C
DAll requests run in parallel
Attempts:
2 left
💡 Hint

Think about how Postman handles dependencies between requests in a collection run.

assertion
intermediate
2:00remaining
Correct Assertion to Check Response Status
In a Postman test script, which assertion correctly checks that the response status code is 200?
Apm.test('Status code is 200', () => pm.response.status === 200);
Bpm.test('Status code is 200', () => pm.response.statusCode === '200');
Cpm.test('Status code is 200', () => pm.response.statusCode == 200);
Dpm.test('Status code is 200', () => pm.response.to.have.status(200));
Attempts:
2 left
💡 Hint

Look for the correct Postman assertion syntax for status code.

🔧 Debug
advanced
2:00remaining
Why Does This Postman Test Fail?
Consider this Postman test script: pm.test('Response has userId', () => { pm.expect(pm.response.json().userId).to.eql(123); }); The test fails even though the response JSON is {"userId": 123}. What is the most likely reason?
Postman
pm.test('Response has userId', () => {
  pm.expect(pm.response.json().userId).to.eql(123);
});
AThe userId in response is a string, not a number
BThe response is not parsed as JSON because Content-Type header is missing or incorrect
CThe pm.expect syntax is incorrect
DThe test script runs before the response is received
Attempts:
2 left
💡 Hint

Check how Postman parses response bodies based on headers.

framework
advanced
2:00remaining
Controlling Request Execution Flow in Postman Collection Runner
Which Postman feature allows you to control the flow of requests during a collection run, such as skipping or repeating requests based on conditions?
AUsing pm.setNextRequest() in test scripts
BUsing environment variables only
CUsing pre-request scripts to delay requests
DUsing the Postman monitor scheduling
Attempts:
2 left
💡 Hint

Think about how to programmatically decide which request runs next.

🧠 Conceptual
expert
2:00remaining
Effect of pm.setNextRequest(null) in Postman Collection Run
What happens when pm.setNextRequest(null) is called inside a test script during a Postman collection run?
AThe collection run stops immediately after the current request
BThe collection run restarts from the first request
CThe next request in the collection runs as usual
DThe current request is retried
Attempts:
2 left
💡 Hint

Consider what setting next request to null means for the runner.