Test Overview
This test sends a request to an API endpoint and checks if the response time is within an acceptable limit (less than 500 milliseconds). It verifies the API performance meets the expected speed.
This test sends a request to an API endpoint and checks if the response time is within an acceptable limit (less than 500 milliseconds). It verifies the API performance meets the expected speed.
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 200 and response time recorded | - | PASS |
| 3 | Check if response time is less than 500 milliseconds | Response time is measured (e.g., 320ms) | pm.expect(pm.response.responseTime).to.be.below(500); | PASS |