Test Overview
This test checks if the API endpoint responds correctly and within an acceptable time, ensuring the API is healthy and available.
This test checks if the API endpoint responds correctly and within an acceptable time, ensuring the API is healthy and available.
pm.test("API responds with status 200", function () { pm.response.to.have.status(200); }); 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 GET request to API endpoint | Postman sends request to the API server | - | PASS |
| 2 | Receive response from API | API server returns HTTP status and response data | - | PASS |
| 3 | Check if response status is 200 | Response status code is 200 OK | pm.response.to.have.status(200) | PASS |
| 4 | Check if response time is less than 500ms | Response time recorded by Postman | pm.expect(pm.response.responseTime).to.be.below(500) | PASS |