Challenge - 5 Problems
Response Time Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate1:30remaining
What is the response time unit in Postman test scripts?
In Postman test scripts, the response time is accessed using
pm.response.responseTime. What unit is this value measured in?Postman
console.log(pm.response.responseTime);
Attempts:
2 left
💡 Hint
Think about how fast computers measure time and what is practical for API response times.
✗ Incorrect
Postman measures response time in milliseconds because it is precise enough for API testing and easy to interpret.
❓ assertion
intermediate2:00remaining
Which assertion correctly checks if response time is under 500ms?
You want to write a Postman test to verify the API response time is less than 500 milliseconds. Which assertion is correct?
Attempts:
2 left
💡 Hint
Look for the assertion that checks the value is smaller than 500.
✗ Incorrect
The assertion uses
to.be.below(500) to confirm the response time is less than 500 milliseconds.🧠 Conceptual
advanced1:30remaining
Why is monitoring response time important in API testing?
Choose the best reason why response time monitoring is critical in API testing.
Attempts:
2 left
💡 Hint
Think about how slow responses affect users.
✗ Incorrect
Response time monitoring helps ensure the API is fast enough to provide a good user experience and meets performance goals.
🔧 Debug
advanced2:00remaining
Identify the error in this Postman test for response time
This Postman test is intended to fail if response time exceeds 1000ms. What is wrong with it?
Postman
pm.test('Response time is acceptable', () => { pm.expect(pm.response.responseTime > 1000).to.be.false; });
Attempts:
2 left
💡 Hint
Check what pm.expect expects as input.
✗ Incorrect
pm.expect expects a value to assert on, not a boolean expression. The correct way is to assert on the value directly with a matcher.
❓ framework
expert3:00remaining
How to integrate response time checks in a Postman Collection Runner with multiple requests?
You want to fail the entire Postman Collection run if any request takes longer than 800ms. Which approach is best?
Attempts:
2 left
💡 Hint
Think about how to track failures across multiple requests in Postman.
✗ Incorrect
Setting a collection variable when a request exceeds the threshold allows a final test to fail the run if any request was slow.