Test Overview
This test checks if a Postman monitor is scheduled correctly and runs at the expected time. It verifies that the monitor triggers and completes successfully.
This test checks if a Postman monitor is scheduled correctly and runs at the expected time. It verifies that the monitor triggers and completes successfully.
pm.test("Monitor runs successfully at scheduled time", function () { pm.expect(pm.response.code).to.equal(200); pm.expect(pm.response.json().status).to.equal("completed"); pm.expect(pm.response.json().run_at).to.be.a('string'); });
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Postman environment ready with monitor scheduled | - | PASS |
| 2 | Monitor triggers at scheduled time | Monitor run initiated by Postman scheduler | - | PASS |
| 3 | Postman sends request and receives response | Response received with status code 200 and JSON body | pm.response.code == 200 | PASS |
| 4 | Test script runs assertions on response | Response JSON contains status and run_at fields | pm.response.json().status == 'completed' | PASS |
| 5 | Test script checks run_at field is a string | run_at field present and is a string timestamp | pm.response.json().run_at is a string | PASS |
| 6 | Test completes successfully | Monitor run verified as successful and on schedule | - | PASS |