Code Monkey home page Code Monkey logo

restassured-cucumber-framework's Introduction

Swagger Petstore API Tests (Cucumber - Rest Assured)

This is automation suite is designed to test the Swagger Pet store POST /pet request (Additonal services have also been included but were not essential).

The project has 12 scenarios that that can be located within the feature files:

  • src/test/resources/OrderTests.feature
  • src/test/resources/PetTests.feature
  • src/test/resources/UserTests.feature

OrderTests.feature scenarios include: Scenario: Correct error message is provided when searching for an order that does not exist. Scenario: Users are able to place orders for pets Scenario: Users are able to search for orders by its id Scenario: Users are able to place orders for available pets Scenario: Users are NOT able to place orders for available pets (fails within test suite, this is error in the API rather than the automation suite assuming users should not be able to create orders for pets that are not available).

PetTests.feature scenarios include: Scenario: Users are able to add pets to the system Scenario: Users are able to delete pets from the system Scenario: Users are able to add pets that have multiple tags Scenario: Users are able to add pets that have no tags Scenario: Id's are automatically generated for pets when not supplied with the request Scenario: Adding a pet with no body for the request results in a 400 response

UserTests.feature scenarios include: Scenario: Users are searchable by their username

Important Note: scenarios need to have the tag @smokeTest in order to be included in test executions

You will need:
- Java 1.8+ installed (Does not work with Java below 1.8) [I ran it on JDK 11 as well]
- Maven Installed (I use version 3.5.2) OR Gradle 3.6.1
- Eclipse (Or another Java IDE)

Important: This suite should work on both windows and mac platforms however has only been tested on a Mac. If possible please use a Mac to execute the test suite

In order to execute the automation suite navigate to the Project directory within a Terminal/CMD window and run the command: 'mvn clean test'. OR 'gradle clean test'

12 Scenarios will be executed. Report file can be found 'target/reports/test-report/index.html' 1 of the 12 test scenarios (Users are NOT able to place orders for available pets) within the OrderTests feature file will fail. The test is coded correctly, this is a legitimate failure when using the assumption that users should not be able to place orders for pets that are not available.

restassured-cucumber-framework's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.