This project contains a Postman collection for testing the CAT API (The Cat API), which provides access to cat images and related data.
The CAT API allows users to search for cat images with various parameters such as limit and mime types.
The collection uses a variable {{base_url}} which should be set to the API endpoint, typically https://api.thecatapi.com/v1.
- Collection Name: CAT_API
- Requests:
test_case: GET /images/search - Searches for cat images with query parameters
- Method: GET
- Endpoint:
/images/search - Query Parameters:
limit: Number of images to return (e.g., 2)mime_types: File type filter (e.g., jpg)
The API returns a JSON array of image objects, each containing:
id: Unique image identifierurl: Direct URL to the imagewidth: Image width in pixelsheight: Image height in pixels
- Import the
CAT_API.postman_collection.jsonfile into Postman - Set the
base_urlvariable tohttps://api.thecatapi.com/v1 - Run the collection or individual requests
This collection can be used for:
- Functional testing of the API endpoints
- Performance testing
- Load testing with multiple iterations
The collection includes automated tests. Example test code:
pm.test("Should return 1 result", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.length).to.eql(1);
});
pm.test("URL should end with .gif", function () {
var jsonData = pm.response.json();
pm.expect(jsonData[0].url).to.include(".gif");
});This is part of an SQA (Software Quality Assurance) roadmap assignment focused on API testing methodologies.