Base URL: https://reqres.in
{ |
Status Code Validation:
Ensure that the response status code is 200 OK.
pm.test("Status Code is 200", function () { |
Validate Response Structure:
Verify that the response contains the correct fields (page, per_page, total, data, etc.).
pm.test("Response contains necessary fields", function () { |
{ |
Response:
{ |
Test Cases:
Status Code Validation:
Ensure that the response status code is 201 Created.
pm.test("Status Code is 201", function () { |
Response Field Validation:
Validate that the name and job fields match the request.
pm.test("Response matches input data", function () { |
Method: PUT
Endpoint: /api/users/:id
Status Code: 200 OK
Request URL: https://reqres.in/api/users/2
Body:
{ |
{ |
Status Code Validation:
Ensure that the response status code is 200 OK.
pm.test("Status Code is 200", function () { |
Updated Data Validation:
Verify that the job field reflects the updated value.
pm.test("Job updated correctly", function () { |
Method: DELETE
Endpoint: /api/users/:id
Status Code: 204 No Content
Request URL: https://reqres.in/api/users/2
Status Code Validation:
Ensure that the response status code is 204 No Content.
pm.test("Status Code is 204", function () { |
Method: GET
Endpoint: /api/users?delay=3
Status Code: 200 OK
Request URL: https://reqres.in/api/users?delay=3
{ |
Status Code Validation:
Ensure that the response status code is 200 OK.
pm.test("Status Code is 200", function () { |
Response Time Validation:
Ensure that the response time is within acceptable limits.
pm.test("Response time is less than 5000ms", function () { |