This is a test automation framework using Rest-Assured for API testing, Cucumber for BDD, and ExtentReports for reporting. The framework allows automated API tests using the Cucumber BDD approach while generating detailed HTML reports with Extent Reports.
- Java 8+
- Maven - To manage dependencies
- IDE (e.g., IntelliJ, Eclipse)
- Rest-Assured: For API Testing
- Cucumber: For Behavior-Driven Development (BDD)
- JUnit: To execute Cucumber tests
- ExtentReports: For detailed HTML test reports
-
Clone the repository:
git clone https://github.com/kulwinder-singh17/restassured-cucumber-bdd.git cd restassured-cucumber-bdd
-
Install dependencies via Maven:
mvn clean install
src/
├── main/
│ └── java/
│ └── com/
│ └── yourcompany/
│ └── utils/
│ │ ├── ExtentManager.java
│ │ └── ExtentTestManager.java
│ └── base/
│ └── ApiService.java
├── test/
│ └── java/
│ └── com/
│ └── yourcompany/
│ ├── hooks/
│ │ └── Hooks.java
│ ├── steps/
│ │ └── Steps.java
│ └── runners/
│ │ └── Runner.java
│ └── features/
│ └── city.feature
└── resources/
To run the tests, execute the following command:
mvn test
Feature: Weather API Testing
Scenario Outline: Get current weather of "<City>"
Given check weather of "<City>" using GET
Then status code should be 200
Examples:
| City |
| London |
| Mexico |
| Mumbai |
This script is licensed under the Apache License. See LICENSE.md for more details.