This repository contains API tests using Postman with Swagger documentation for the "MyPetStore" API.
- Method: GET
- URL: https://petstore.swagger.io/v2/pet/findByStatus?status=available
- Method: GET
- URL: https://petstore.swagger.io/v2/pet/findByStatus?status=pending
- Tests:
- Verify status code is 200
- Verify "pending" is included in the response
- Verify response time is less than 200ms
- Method: GET
- URL: https://petstore.swagger.io/v2/pet/findByStatus?status=sold
- Tests:
- Verify status code is 200
- Verify "sold" is included in the response
- Verify response time is less than 200ms
- Method: GET
- URL: https://petstore.swagger.io/v2/pet/
- Tests:
- Verify status code is 405
- Verify response time is less than 200ms
- Method: POST
- URL: https://petstore.swagger.io/v2/pet/
- Body:
{ "id": 0, "category": { "id": 0, "name": "Catty" }, "name": "Catty", "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "Catty" } ], "status": "available" }
- Tests:
- Verify status code is 200
- Verify "Catty" is included in the response
- Method: GET
- URL: https://petstore.swagger.io/v2/pet/9223372036854775807
- Tests:
- Verify status code is 200
- Method: PUT
- URL: https://petstore.swagger.io/v2/pet/
- Body:
{ "id": 123, "category": { "id": 123, "name": "Tigress" }, "name": "Tigress", "photoUrls": [ "string" ], "tags": [ { "id": 123, "name": "Tigress" } ], "status": "available" }
- Tests:
- Verify status code is 200
- Verify "Tigress" and "123" are included in the response
- Method: PUT
- URL: https://petstore.swagger.io/v2/pet/
- Body:
{ "id": 8, "category": { "id": 8, "name": "Dx" }, "name": "Dx", "photoUrls": [ "string" ], "tags": [ { "id": 8, "name": "Dx" } ], "status": "available" }
- Tests:
- Verify status code is 200
- Verify "8" is included in the response
- Method: DELETE
- URL: https://petstore.swagger.io/v2/pet/8
- Body:
{ "code": 404, "type": "unknown", "message": "8" }
- Tests:
- Verify status code is 404
- Collection file can be found in Mypetstore.postman_collection.json
- Import the "Mypetstore.postman_collection.json" collection file into Postman.
- Run the test cases individually or execute the entire collection.
Feel free to reach out if you have any questions or need further assistance!