This project is designed to demonstrate how to use RestAssured, Cucumber, Java, and Maven to test an API.
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.
- Automated testing of an API endpoints
- Behavior-driven development (BDD) with Cucumber
- Easy integration with CI/CD pipelines
- Maven-based project management
Before running the automated tests, make sure you have the following prerequisites installed:
- Java Development Kit (JDK) 8 or above
- Apache Maven
- Git
- Clone the repository using the following command:
git clone https://github.com/andytheqaguy/SimpleBookAPITesting
- Navigate to the project directory:
cd simple-book-api-testing
- Build the project using Maven:
mvn clean install
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.
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.
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.
This project is licensed under the MIT License.