https://github.com/jagatheshwarann/cucumberbdd-test-framework
This repository contains a Cucumber BDD-based Automation Framework built using Java, Selenium WebDriver, and TestNG, designed to streamline the testing of web applications. The framework promotes collaboration through human-readable feature files and is adaptable to suit the requirements of any modern BDD-driven automation project.
https://github.com/jagatheshwarann/cucumberbdd-test-framework
aes-encryption ashot bdd-framework cucumber cucumber-java cucumber-report gherkin java log4j2 maven page-object-model pico-container restassured selenium selenium-webdriver testng
Last synced: 3 months ago
JSON representation
This repository contains a Cucumber BDD-based Automation Framework built using Java, Selenium WebDriver, and TestNG, designed to streamline the testing of web applications. The framework promotes collaboration through human-readable feature files and is adaptable to suit the requirements of any modern BDD-driven automation project.
- Host: GitHub
- URL: https://github.com/jagatheshwarann/cucumberbdd-test-framework
- Owner: JagatheshwaranN
- License: mit
- Created: 2023-03-13T13:59:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T16:00:02.000Z (6 months ago)
- Last Synced: 2025-06-08T05:44:09.347Z (4 months ago)
- Topics: aes-encryption, ashot, bdd-framework, cucumber, cucumber-java, cucumber-report, gherkin, java, log4j2, maven, page-object-model, pico-container, restassured, selenium, selenium-webdriver, testng
- Language: Java
- Homepage:
- Size: 358 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฅ๏ธ Cucumber BDD Test Framework
## ๐ Overview
This repository contains a Cucumber BDD-based Test Automation Framework built using Java, Selenium WebDriver, and TestNG. It supports Behavior-Driven Development (BDD) for web application testing, enabling collaboration between technical and non-technical stakeholders through human-readable feature files. The framework is modular, scalable, and maintainable, with a clear separation of concerns. It integrates custom services, utility classes, page components, and step definitions, and supports both UI and API testing, data-driven testing, and service layer validation, making it adaptable for a wide range of automation projects.
---
## โจ Key Features
๐งช **Behavior-Driven Development (BDD)** with Cucumber and Gherkin syntax
โ๏ธ **Modular Page Object Model (POM)** for UI automation
๐ **Data-Driven Testing** using Excel and Custom DataTable Mappers
๐ **Service Layer Support** for API interaction and validation
๐ **Custom Parameter & Data Table Type Bindings** for reusable step logic
๐งฉ **Hooks and Context Management** for clean stateful execution
๐ธ **Screenshot Capture and Logging** integrated with step failures
๐ **Advanced Reporting** using ExtentReports
๐ง **Multiple Environments** via `stage.properties`, `prod.properties`
๐ **TestNG and Cucumber CLI Runners** for flexible execution
๐ **Selenium WebDriver** for automated browser interaction
๐ **AES Encryption** for encryption and decryption of sensitive data---
## ๐ง Prerequisites
Before running the framework, ensure the following tools are installed on your system:
โ Java 11 or higher
โ Maven (for dependency management)
โ IDE (e.g., IntelliJ IDEA, Eclipse)---
## ๐ Getting Started
Follow the steps below to set up and execute your tests using the **Cucumber BDD Test Framework**.
---
### 1๏ธโฃ Clone the Repository
```bash
git clone https://github.com/JagatheshwaranN/CucumberBDDTestFramework.git
```---
### 2๏ธโฃ Set Up the Project
Navigate to the project directory and run the following Maven command:
```bash
mvn clean install
```This will download all required dependencies and compile the project.
---
### 3๏ธโฃ Run Tests
You can execute your tests using Maven with custom parameters:
```bash
mvn test -DBrowser=Chrome -DRunType=Local -Dorg.freemarker.loggerLibrary=NONE -DFULL_PAGE_SCREENSHOT=No
```**Parameters:**
- `Browser` โ Specify the browser (e.g., Chrome, Firefox)
- `RunType` โ Choose between Local or Remote execution
- `FULL_PAGE_SCREENSHOT` โ Enable/Disable full-page screenshot capture---
### 4๏ธโฃ Generating Reports
๐ Reports and logs will be auto-generated after test execution:
โ **Cucumber HTML Report** โ `/target/cucumber`
โ **ExtentReports HTML Report** โ `/target/reports`
โ **TestNG HTML Report** โ `/target/surefire-reports`
โ **Screenshots for failed steps** โ `/resources/screenshots`
โ **Detailed Cucumber HTML Report** โ `/target/cucumber-html-reports`> ๐ **Note:**
> To generate the **Detailed Cucumber Report**, use the following command:
>
> ```bash
> mvn verify
> ```
> instead of:
> ```bash
> mvn test
> ```---
## ๐ค Contributions
Feel free to fork the repository, raise issues, or submit pull requests to enhance the framework further!
---
## ๐ง๐ป Maintainer
Built and maintained with โค๏ธ by **Jagatheshwaran N**
GitHub: [@JagatheshwaranN](https://github.com/JagatheshwaranN)---
## ๐ License
This project is open-sourced under the [MIT License](LICENSE).
---
## ๐ Directory Structure
```plaintext
CucumberBDDTestFramework/
โโโ src/
โ โโโ main/
โ โ โโโ java/
โ โ โ โโโ com/
โ โ โ โโโ qa/
โ โ โ โโโ ctf/
โ โ โ โโโ base/
โ โ โ โ โโโ ElementActions
โ โ โ โ โโโ Page
โ โ โ โ โโโ PageComponent
โ โ โ โโโ constant/
โ โ โ โ โโโ BrowserType
โ โ โ โ โโโ RunType
โ โ โ โ โโโ TestConstants
โ โ โ โโโ context/
โ โ โ โ โโโ TestContext
โ โ โ โโโ factory/
โ โ โ โ โโโ BrowserFactory
โ โ โ โ โโโ DriverFactory
โ โ โ โ โโโ RunFactory
โ โ โ โโโ handler/
โ โ โ โ โโโ AlertHandler
โ โ โ โ โโโ BrowserHandler
โ โ โ โ โโโ DateTimeHandler
โ โ โ โ โโโ DropDownHandler
โ โ โ โ โโโ InteractionHandler
โ โ โ โ โโโ JavaScriptHandler
โ โ โ โ โโโ VerificationHandler
โ โ โ โ โโโ WaitHandler
โ โ โ โโโ hook/
โ โ โ โ โโโ TestHook
โ โ โ โโโ service/
โ โ โ โ โโโ CookieMapper
โ โ โ โ โโโ ServiceRequest
โ โ โ โ โโโ SpecBuilder
โ โ โ โโโ util/
โ โ โ โโโ EncryptionManager
โ โ โ โโโ ExcelReader
โ โ โ โโโ ExceptionHub
โ โ โ โโโ FileReader
โ โ โ โโโ ScreenCapture
โ โโโ resources/
โ โโโ log4j2.properties
โโโ test/
โ โโโ java/
โ โ โโโ com/
โ โ โโโ qa/
โ โ โโโ ctf/
โ โ โโโ app/
โ โ โโโ Cookies
โ โ โโโ CustomDataTableType
โ โ โโโ CustomParameterType
โ โ โโโ base/
โ โ โ โโโ PageBase
โ โ โ โโโ PageFactory
โ โ โโโ constant/
โ โ โ โโโ Endpoint
โ โ โ โโโ Message
โ โ โโโ context/
โ โ โ โโโ AppContext
โ โ โโโ domain/
โ โ โ โโโ BillingDetails
โ โ โ โโโ ExcelDataToDataTable
โ โ โ โโโ Product
โ โ โโโ objects/
โ โ โ โโโ AccountPageObject
โ โ โ โโโ CartPageObject
โ โ โ โโโ CheckoutPageObject
โ โ โ โโโ LoginPageObject
โ โ โ โโโ StorePageObject
โ โ โโโ pages/
โ โ โ โโโ AccountPage
โ โ โ โโโ CartPage
โ โ โ โโโ CheckoutPage
โ โ โ โโโ LoginPage
โ โ โ โโโ StorePage
โ โ โโโ runner/
โ โ โ โโโ TestNGRunnerTest
โ โ โโโ service/
โ โ โ โโโ CartService
โ โ โโโ steps/
โ โ โโโ BaseSteps
โ โ โโโ CartSteps
โ โ โโโ CheckoutSteps
โ โ โโโ CustomerSteps
โ โ โโโ LoginSteps
โ โ โโโ StoreSteps
โ โโโ resources/
โ โโโ config/
โ โ โโโ prod.properties
โ โ โโโ stage.properties
โ โโโ data/
โ โ โโโ testData.xlsx
โ โโโ features/
โ โ โโโ AddToCartOnStore.feature
โ โ โโโ LoginToStore.feature
โ โ โโโ PlaceOrderAsGuest.feature
โ โ โโโ PlaceOrderAsGuestByService.feature
โ โ โโโ PlaceOrderWithExcelDataAsGuest.feature
โ โโโ logs/
โ โ โโโ AutomationExecution.log
โ โโโ screenshots/
| | โโโ 19_03_2025_11_21_07.png
โ โโโ xml/
โ | โโโ testNG.xml
โ โโโ extent.properties
โ โโโ cucumber.properties
โ โโโ html-config.xml
โ โโโ pdf-config.yaml
โ โโโ spark-config.xml
โโโ pom.xml