Skip to content

Simple Books API testing w/ RestAssured, Cucumber, Java and Maven

License

Notifications You must be signed in to change notification settings

andytheqaguy/SimpleBooksAPITesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Books API Testing

This project is designed to demonstrate how to use RestAssured, Cucumber, Java, and Maven to test an API.

Table of Contents

Description

This project provides a set of automated tests for the simple books API using RestAssured for API testing, Cucumber for behavior-driven development (BDD), Java for the programming language, and Maven for project management.

Features

  • Automated testing of an API endpoints
  • Behavior-driven development (BDD) with Cucumber
  • Easy integration with CI/CD pipelines
  • Maven-based project management

Prerequisites

Before running the automated tests, make sure you have the following prerequisites installed:

  • Java Development Kit (JDK) 8 or above
  • Apache Maven
  • Git

Setup

  1. Clone the repository using the following command:
git clone https://github.com/andytheqaguy/SimpleBookAPITesting
  1. Navigate to the project directory:
cd simple-book-api-testing
  1. Build the project using Maven:
mvn clean install

Running the Tests

To run the tests, use the following Maven command:

mvn clean verify

This will trigger the tests written using Cucumber and RestAssured against the API.

Test Structure

The automated tests in this repository are structured using the BDD (Behavior-Driven Development) approach and written in Gherkin syntax. The feature files can be found in the src/test/resources/features directory, and the corresponding step definitions are implemented in Java under the src/test/java/keywords directory.

  • src/test/resources/features: Contains feature files written in Gherkin syntax that describe the desired behavior of this project.
  • src/test/java/keywords: Contains Java step definition classes that map the Gherkin steps to the corresponding automation code.

Reporting

Serenity BDD generates comprehensive and easily understandable reports after test execution. The reports are available in HTML format and can be found in the target/site/serenity directory index.html file after running the tests.

License

This project is licensed under the MIT License.

About

Simple Books API testing w/ RestAssured, Cucumber, Java and Maven

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published