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.
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.
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 | Send HTTP GET request to the API endpoint | Postman sends the request and waits for the response | - | PASS |
| 2 | Receive response from the API | Response received with status code 200 and response time recorded | - | PASS |
| 3 | Check if response time is less than 500 milliseconds | Response time is measured (e.g., 350ms) | Assert responseTime < 500ms | PASS |