The Online Banking Automation Framework is an End-to-End (E2E) BDD Cucumber automation framework built to test the core banking functionalities of XYZ Bank. Developed during the Furlough period in 2024, this framework is designed to provide robust, maintainable, and scalable test automation solutions for banking applications. It leverages Java, Selenium WebDriver, and Cucumber to ensure seamless, cross-browser testing and efficient reporting.
- Scalable and Maintainable: Designed to handle growing applications with ease while ensuring future-proof maintenance.
- Cross-Browser Testing: Supports testing across multiple browsers to ensure compatibility and stability.
- BDD with Cucumber: Behavior-Driven Development with clear, readable Gherkin syntax that bridges the gap between technical and non-technical stakeholders.
- Comprehensive Reporting: Generates detailed HTML, JSON, and DOCX reports, providing both summary and detailed views of test results.
- Efficient Logging: Utilizes Log4j for comprehensive logging, aiding in better traceability and debugging.
- Reusable Codebase: Encourages reusability of code across different test scenarios, making the framework easily extendable and maintainable.
- Java: Robust and scalable programming language for framework development.
- Selenium WebDriver: For automating browser interactions and UI testing.
- Cucumber: Behavior-Driven Development (BDD) tool that supports Gherkin syntax for writing test scenarios.
- JUnit4: For managing test execution and results.
- Log4j: Logging framework that provides efficient logging functionality.
- WebDriverManager: Automatically manages browser drivers, eliminating manual setup.
- poi-ooxml: Used for generating custom DOCX reports.
The project is organized to ensure ease of navigation and scalability. Below is an overview of the folder structure:
-
src/
main/
java/
XYZ_Bank/
hooks/
pageObject/
runners/
stepDefinitions/
customerOperations/
utils/
resources/
featureFile/
TestCase/
config.properties
log4j.properties
-
src/test/
java/
XYZ_Bank/
OnlineBankingApplication/
-
target/
(Generated after execution) -
test-report/
(Generated after execution)
XYZ_Bank.hooks
: Contains the hooks for setting up and tearing down tests (e.g., opening and closing browsers).XYZ_Bank.pageObject
: Implements the Page Object Model (POM) pattern for reusability and maintainability of web elements.XYZ_Bank.runners
: The runner class where test execution is triggered. It specifies the feature files and step definitions for Cucumber.XYZ_Bank.stepDefinitions
: Contains step definitions that map the Gherkin steps in the feature files to Java methods.XYZ_Bank.utils
: Includes utility classes for functions that can be reused across multiple tests.featureFile
: Contains Cucumber feature files that define test scenarios in Gherkin syntax.TestCase
: Test case-related files needed for the tests.
- Java (version 1.8 or higher) installed.
- Maven for dependency management and project build.
- Eclipse (or any preferred IDE) set up for Java and Maven projects.
- Browser for browser automation (WebDriverManager will handle Browser driver automatically).
- Clone the repository: Clone the project repository to your local machine using Git:
git clone https://github.com/ksvijayan06/online-banking-automation-bdd.git
- Open Eclipse.
- Go to File > Import > General > Existing Projects into Workspace.
- Browse to the folder where you cloned the repository and select it.
- Click Finish.
- Open IntelliJ IDEA.
- Click File > Open and select the folder where you cloned the repository.
- IntelliJ will automatically detect it as a Maven project.
Once the project is loaded in your IDE, Maven will automatically handle the dependencies. If needed, you can manually update them:
- In Eclipse: Right-click on the project > Maven > Update Project.
- In IntelliJ IDEA: Right-click on the project > Maven > Reimport.
To execute the tests:
- Navigate to the
XYZ_Bank.runners
package in your IDE. - Locate and open the
RunnerClass.java
file. - Right-click on the file and select Run As JUnit Test(or use your IDE's run options).
- The framework will begin executing the tests.
After running the tests, you will find the following reports:
- Cucumber HTML & JSON Reports in the
target
directory. - Custom DOCX Reports for formal documentation, can be found in the
test-report
directory.
This project is licensed under the MIT License - see the LICENSE file for details.