You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "StartFragment\n\n# **JSONPlaceholder API Contract Tests**\n\n## **Purpose**\n\nThis collection validates the **contract**, **structure**, and **basic health** of the JSONPlaceholder API. \n \nThe goal is to ensure that each endpoint consistently returns responses that match the expected schema, data types, and status codes. These tests help detect breaking changes, regressions, and deviations from the documented API behavior.\n\n## **Target API**\n\nAll tests target the public JSONPlaceholder API: \n[<b>https://jsonplaceholder.typicode.com</b>](https://jsonplaceholder.typicode.com)\n\nThis API is a free fake REST service used for learning, prototyping, and testing workflows.\n\n## **How to Run This Collection**\n\nBefore running the collection, make sure you have the required environment variable:\n\n### **Environment Variable**\n\n| Variable | Description |\n| --- | --- |\n| `baseUrl` | The base URL of the target API. Set it to `https://jsonplaceholder.typicode.com`. |\n\n### Steps\n\n1. Make sure an environment is selected in Postman.\n \n2. https://jsonplaceholder.typicode.com\n \n3. Open the collection and click **Run Collection** (or use Newman/GitHub Actions if configured).\n \n4. Execute the tests. \n \n All requests will automatically use the `{{baseUrl}}` variable.\n \n\nEndFragment",
"description": "StartFragment\n\n**Purpose:** \n\nRetrieves the full list of posts and validates the API’s ability to return a complete collection.\n\n**What this request tests:**\n\n- HTTP **200** status\n\n- Response time performance\n\n- JSON array structure\n\n- Contract validation for each post object (userId, id, title, body)\n\n- Ensures the endpoint consistently returns the expected list format\n\n\nEndFragment"
45
57
},
46
58
"response": []
47
59
},
@@ -57,7 +69,16 @@
57
69
"});\r",
58
70
"pm.test(\"Response time is less than 200ms\", function () {\r",
"description": "StartFragment\n\n**Purpose:** \n\nRetrieves one post by its ID and validates the integrity of a single resource.\n\n**What this request tests:**\n\n- HTTP **200** status\n\n- Response time performance\n\n- Full JSON contract validation for a single post resource\n\n- Verifies presence and types of required fields (userId, id, title, body)\n\n- Confirms the endpoint correctly handles path parameters\n\n\nEndFragment"
0 commit comments