Test Overview
This test sends a GET request to a public API endpoint and verifies that the response status code is 200, indicating success.
This test sends a GET request to a public API endpoint and verifies that the response status code is 200, indicating success.
pm.test("Status code is 200", function () { pm.response.to.have.status(200); });
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Postman app is open with the GET request prepared | - | PASS |
| 2 | Send GET request to https://jsonplaceholder.typicode.com/posts/1 | Request sent, waiting for response | - | PASS |
| 3 | Receive response from server | Response received with status code 200 and JSON body | - | PASS |
| 4 | Run assertion to check status code is 200 | Response status code is 200 | pm.response.to.have.status(200) | PASS |