Challenge - 5 Problems
Response Time Benchmarking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Response Time Assertion in Postman Test Script
Given the following Postman test script snippet, what will be the result of the assertion if the response time is 350 ms?
Postman
pm.test('Response time is less than 300ms', function () { pm.expect(pm.response.responseTime).to.be.below(300); });
Attempts:
2 left
💡 Hint
Check the comparison operator and the actual response time value.
✗ Incorrect
The assertion checks if the response time is below 300 ms. Since 350 ms is greater than 300 ms, the test fails.
🧠 Conceptual
intermediate1:30remaining
Understanding Response Time Metrics in Postman
Which Postman property correctly represents the total time taken for the server to send the full response?
Attempts:
2 left
💡 Hint
Look for the property that measures time duration.
✗ Incorrect
pm.response.responseTime gives the total time in milliseconds taken to receive the full response from the server.
🔧 Debug
advanced2:30remaining
Debugging a Failing Response Time Test in Postman
A Postman test script intended to check if response time is under 500 ms is failing with a ReferenceError: pm is not defined. What is the most likely cause?
Postman
test('Response time under 500ms', function () { pm.expect(pm.response.responseTime).to.be.below(500); });
Attempts:
2 left
💡 Hint
Check the function used to define the test in Postman scripts.
✗ Incorrect
In Postman scripts, tests must be defined using pm.test, not test. Using test causes pm to be undefined, leading to ReferenceError.
❓ framework
advanced3:00remaining
Best Practice for Benchmarking Response Time in Postman Collections
Which approach is best to benchmark average response time across multiple requests in a Postman collection?
Attempts:
2 left
💡 Hint
Think about automating timing and aggregation within Postman scripts.
✗ Incorrect
Using collection-level scripts to track and store response times for each request allows automated calculation of average response time within Postman.
❓ assertion
expert3:00remaining
Complex Assertion for Response Time with Conditional Logging
In a Postman test script, which option correctly asserts that response time is below 400 ms and logs a warning if it is between 300 ms and 400 ms?
Attempts:
2 left
💡 Hint
Check the assertion boundary and the logging method used for warnings.
✗ Incorrect
Option B correctly asserts response time below 400 ms and logs a warning if time is between 300 (inclusive) and 400 (exclusive) ms using console.warn, which is appropriate for warnings.