Skip to content

pymalikpy/PetStoreAutomationAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PetStoreAutomationAPI

This project is a simple automation framework for testing Pet Store API endpoints using Java and REST Assured.

Features

  • Automated API tests for the Pet Store application
  • Built with REST Assured for easy HTTP request/response handling
  • Suitable for functional and regression API testing

Tech Stack

  • Language: Java
  • Testing Library: REST Assured
  • Build Tool: (Recommended) Maven or Gradle

Getting Started

Prerequisites

  • Java 8 or later
  • Maven or Gradle

Installation

  1. Clone the repository:

    git clone https://github.com/pymalikpy/PetStoreAutomationAPI.git
    cd PetStoreAutomationAPI
  2. Install dependencies with Maven:

    mvn clean install

    or with Gradle:

    gradle build

Running Tests

  • Use Maven:
    mvn test
  • Or Gradle:
    gradle test

Project Structure

src/
 └── test/
     └── java/
         └── (test classes)
  • Test classes are typically located in src/test/java.

Sample Test (REST Assured)

import io.restassured.RestAssured;
import io.restassured.response.Response;

import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

public class PetStoreTest {

    @Test
    public void getPetById_returns200() {
        Response response = RestAssured.get("https://petstore.swagger.io/v2/pet/1");
        assertThat(response.getStatusCode(), equalTo(200));
    }
}

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

Happy testing with REST Assured!

About

This is a small API automation project using the rest assured library to automate CRUD operations of the pet store user APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors