Giter Club home page Giter Club logo

api-serenitybdd-sample's Introduction

API-SerenityBDD-sample

Overview:

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. This API framework is developed using Serenity-REST Assured. REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs. Serenity BDD has implemented Rest Assured wrapper to provide better/faster execution and generate report documentation. In this framework we sample for API testing with (BDD) and without feature files (TDD).

For Demo purpose all the test cases are StudentApp API. StudentApp Jar file is placed in studentApp folder inside resources package.

Some of the key features of this framework:

  1. It generates Serenity report with all the step details.
  2. It support parallel execution of API test cases.
  3. FeatureRunner file can be used to run Serenity BDD style API tests. JunitTestRunner can be used to run API tests without feature. One of these style can be used to develop framework. For demo purpose both the type has been considered here.
  4. Student app will started before the test runs and also closed after all the tests are complete. All these will be done programmatically, there is no manual intervention required.
  5. Test execution can be triggered form command line. This will run both the above style of tests.
  6. Easy integration to CI/CD pipeline.

Required Setup :

  • Java should be installed and configured.
  • Maven should be installed and configured.
  • Download the files from Git repository either as zip file OR using Git.

Running Test:

Open the command prompt and navigate to the folder in which pom.xml file is present. Run the below Maven command.

mvn clean serenity:aggregate verify

Once the execution completes report will be generated in below folder structure.

Serenity Report: /target/site/serenity/index.html

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.