Skip to content

aniruddhaguha/CAT_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

CAT API Project

Overview

This project contains a Postman collection for testing the CAT API (The Cat API), which provides access to cat images and related data.

API Description

The CAT API allows users to search for cat images with various parameters such as limit and mime types.

Base URL

The collection uses a variable {{base_url}} which should be set to the API endpoint, typically https://api.thecatapi.com/v1.

Collection Details

  • Collection Name: CAT_API
  • Requests:
    • test_case: GET /images/search - Searches for cat images with query parameters

Request: Images Search

  • Method: GET
  • Endpoint: /images/search
  • Query Parameters:
    • limit: Number of images to return (e.g., 2)
    • mime_types: File type filter (e.g., jpg)

Sample Response

The API returns a JSON array of image objects, each containing:

  • id: Unique image identifier
  • url: Direct URL to the image
  • width: Image width in pixels
  • height: Image height in pixels

How to Use

  1. Import the CAT_API.postman_collection.json file into Postman
  2. Set the base_url variable to https://api.thecatapi.com/v1
  3. Run the collection or individual requests

Testing

This collection can be used for:

  • Functional testing of the API endpoints
  • Performance testing
  • Load testing with multiple iterations

Test Scripts

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");
});

Assignment Context

This is part of an SQA (Software Quality Assurance) roadmap assignment focused on API testing methodologies.

About

This SQA assignment features a Postman collection for testing The Cat API's image search endpoint. It demonstrates API testing best practices with automated scripts validating response structure, data integrity, and business rules. Includes comprehensive documentation, case study on testing methodologies, and practical functional

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors