0
0
Postmantesting~10 mins

Response time in Postman - Test Execution Trace

Choose your learning style9 modes available
Test Overview

This test sends a request to an API endpoint and verifies that the response time is within an acceptable limit, ensuring the API is fast enough for users.

Test Code - Postman
Postman
pm.test("Response time is less than 500ms", function () {
    pm.expect(pm.response.responseTime).to.be.below(500);
});
Execution Trace - 3 Steps
StepActionSystem StateAssertionResult
1Send HTTP GET request to the API endpointPostman sends the request and waits for the response-PASS
2Receive response from the APIResponse received with status code 200 and response time recorded-PASS
3Check if response time is less than 500 millisecondsResponse time is measured (e.g., 350ms)Assert responseTime < 500msPASS
Failure Scenario
Failing Condition: Response time is equal to or greater than 500 milliseconds
Execution Trace Quiz - 3 Questions
Test your understanding
What does the test verify in this Postman script?
AThe response status code is 500
BThe response time is less than 500 milliseconds
CThe response body contains a specific value
DThe request method is POST
Key Result
Always verify response time to ensure your API meets performance expectations and provides a good user experience.