https://github.com/kulwinder-singh17/api-test-using-bdd
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.
https://github.com/kulwinder-singh17/api-test-using-bdd
bdd cucumber cucumber-java extentreports java junit rest-assured restassured-cucumber-framework
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/kulwinder-singh17/api-test-using-bdd
- Owner: kulwinder-singh17
- License: apache-2.0
- Created: 2024-09-07T07:42:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-07T12:00:31.000Z (over 1 year ago)
- Last Synced: 2025-01-30T03:01:35.395Z (over 1 year ago)
- Topics: bdd, cucumber, cucumber-java, extentreports, java, junit, rest-assured, restassured-cucumber-framework
- Language: Java
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rest-Assured Cucumber BDD Framework with Extent Reports
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.
## Table of Contents
- [Project Setup](#project-setup)
- [Installation](#installation)
- [Project Structure](#project-structure)
- [How to Run the Tests](#how-to-run-the-tests)
- [License](#license)
## Project Setup
### Prerequisites:
1. **Java 8+**
2. **Maven** - To manage dependencies
3. **IDE** (e.g., IntelliJ, Eclipse)
### Libraries and Tools Used:
- **Rest-Assured**: For API Testing
- **Cucumber**: For Behavior-Driven Development (BDD)
- **JUnit**: To execute Cucumber tests
- **ExtentReports**: For detailed HTML test reports
## Installation
1. Clone the repository:
```bash
git clone https://github.com/kulwinder-singh17/restassured-cucumber-bdd.git
cd restassured-cucumber-bdd
```
2. Install dependencies via Maven:
```bash
mvn clean install
```
## Project Structure
```bash
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/
```
## How to Run the Tests
### Using Maven:
To run the tests, execute the following command:
```bash
mvn test
```
### Cucumber Feature File Example:
```bash
Feature: Weather API Testing
Scenario Outline: Get current weather of ""
Given check weather of "" using GET
Then status code should be 200
Examples:
| City |
| London |
| Mexico |
| Mumbai |
```
## License
This script is licensed under the Apache License. See [LICENSE.md](LICENSE.md) for more details.