Test Overview
This test sends a request to an API endpoint and verifies that the response time is less than 500 milliseconds. It ensures the API responds quickly enough for good user experience.
This test sends a request to an API endpoint and verifies that the response time is less than 500 milliseconds. It ensures the API responds quickly enough for good user experience.
pm.test("Response time is less than 500ms", function () { pm.expect(pm.response.responseTime).to.be.below(500); });
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts and sends HTTP request to the API endpoint | Postman sends request and waits for response | - | PASS |
| 2 | Postman receives response from API | Response received with status code and response time recorded | - | PASS |
| 3 | Test script checks if response time is below 500 milliseconds using pm.expect | Response time value available in pm.response.responseTime | pm.expect(pm.response.responseTime).to.be.below(500); | PASS |