0
0
Postmantesting~20 mins

Workflow sequencing in Postman - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Workflow Sequencing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Order of request execution in Postman Collection Runner

You have a Postman collection with 3 requests: Login, Get Profile, and Logout. You want to run them in sequence so that Login runs first, then Get Profile, then Logout. How does Postman Collection Runner execute these requests by default?

ARuns requests in the order they appear in the collection, one after another.
BRuns all requests in parallel at the same time.
CRuns only the first request and skips the rest.
DRuns requests randomly without any order.
Attempts:
2 left
💡 Hint

Think about how a playlist works when you play songs one by one.

Predict Output
intermediate
2:00remaining
Output of test script execution order in Postman

Consider this Postman test script attached to a request:

console.log('Start test');
pm.test('Status code is 200', () => {
  pm.response.to.have.status(200);
});
console.log('End test');

What will be the order of console logs when this test runs?

AStart test, End test
BEnd test, Start test
CStart test, End test, Status code assertion result
DOnly Status code assertion result
Attempts:
2 left
💡 Hint

Think about synchronous vs asynchronous code execution.

locator
advanced
2:00remaining
Correct way to reference environment variable in Postman test script

You want to check if the environment variable authToken is set after a login request. Which locator syntax correctly accesses this variable in a Postman test script?

Apm.env.authToken
Bpm.variables.authToken
Cpm.getEnvironmentVariable('authToken')
Dpm.environment.get('authToken')
Attempts:
2 left
💡 Hint

Check Postman API for environment variable access methods.

assertion
advanced
2:00remaining
Assertion to verify JSON response contains a specific key

You receive this JSON response from an API:

{"user": {"id": 123, "name": "Alice"}}

Which Postman test assertion correctly checks that the response has a user key?

Apm.response.to.have.jsonKey('user');
Bpm.expect(pm.response.json()).to.have.property('user');
Cpm.expect(pm.response.body).to.include('user');
Dpm.response.json().has('user');
Attempts:
2 left
💡 Hint

Use Chai assertion style with pm.expect and to.have.property.

framework
expert
2:00remaining
Sequence control using Postman setNextRequest in a collection

You have a Postman collection with requests: Step1, Step2, and Step3. You want to run Step1 and then conditionally run Step3 skipping Step2. Which test script code in Step1 achieves this?

Apm.setNextRequest('Step3');
Bpostman.setNextRequest('Step3');
Cif (pm.response.code === 200) { postman.setNextRequest('Step3'); } else { postman.setNextRequest('Step2'); }
DsetNextRequest('Step3');
Attempts:
2 left
💡 Hint

Remember the exact method name and object to call for controlling request flow.