Coder Social home page Coder Social logo

petstoreapi's Introduction

PetStore API

This project is developed for automated testing of the Petstore API. Swagger endpoint - https://petstore.swagger.io/#/

Test Cases

API requests related only to Pets have been automated. Following test cases are part of this project.

  • Add Pet
  • View Pet
  • Update Pet
  • Update Pet By Id
  • Find Pet By Id
  • Find Pet By Status
  • Upload Pet Image

Framework

REST Assured for API Testing Rest assured makes testing of http requests easier. It also provides the given, when and then format to write tests which are easier to understand.

TestNG is used as the testing framework Testing frameworks makes writing test cases easy. It also provides features like setup and grouping fo tests.

Maven is used for dependency management and build We are using multiple libraries and Maven makes it extremely easy to make available all required libraries. Also less configuration is required to build tests on a new machine.

Pre-requisites

Step 1: Install Maven 3.0.3+

Download from here

Step 2: Ensure maven binaries are on your PATH (ie. you can run mvn from anywhere)

Follow the installation instructions from here.

Running Tests

In both the cases, results are available in Calliope.

Running locally

  • Clone this git project

  • Navigate to the root of the project and run the below command

mvn test

Uploading Results

  • Create an account at Calliope.pro and get the details. Add the api_key and the profileid from the Calliope account to the config.properties files at src/main/resources/

  • Execute the calliope_results shell script from the root

sh calliope_results

Running via CircleCI

  • Fork this project on github.

  • Login to CircleCI using github credentials.

  • Navigate to Projects. The forked project should be available in the list. Click on "Set up Project"

  • Skip the step to add Sample configs.

  • Click on "Use Existing Config" and then "Start Building".

  • Click on "Project Settings" and then "Environment Variables".

  • Add the "api_key" and "profileid" environment variables from Calliope.

  • Come back to the "Dashboard" and Select main branch and click on "Run Pipeline".

petstoreapi's People

Contributors

adiparab14 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.