Test Overview
This test sends a GET request to a mock server URL in Postman and verifies that the response status code is 200, confirming the mock server is working correctly.
This test sends a GET request to a mock server URL in Postman and verifies that the response status code is 200, confirming the mock server is working correctly.
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 mock server request loaded | - | PASS |
| 2 | Send GET request to mock server URL | Request sent to mock server endpoint | - | PASS |
| 3 | Receive response from mock server | Response received with status code 200 and mock data body | - | PASS |
| 4 | Run test script to check status code | Test script executed in Postman test tab | Verify response status code is 200 | PASS |
| 5 | Test ends with PASS | Test result shows status code 200 assertion passed | pm.response.to.have.status(200) passed | PASS |