This repository hosts a sophisticated Selenium-based test automation framework utilizing Cucumber, Java, Cucumber Dependency Injection (DI), Factory Design Pattern, and the Page Object Model (POM). The framework is designed to enable scalable, maintainable, and efficient automation testing, supporting Behavior-Driven Development (BDD).
- Behavior-Driven Development (BDD): Define test cases in plain English using Cucumber.
- Selenium WebDriver Integration: Interact with web applications across multiple browsers.
- Dependency Injection: Use Cucumber's DI capabilities to manage object creation and dependencies.
- Factory Design Pattern: Implement factory classes to encapsulate the creation of page objects, ensuring better modularity and flexibility.
- Page Object Model (POM): Organize and maintain web elements and interactions using POM.
- Parallel Execution: Ability to run tests in parallel for faster execution.
- Comprehensive Reporting: Generate detailed test execution reports with extent report.
src
βββ main
β βββ java
β β βββ enums
β
βββ test
β βββ java
β β βββ feature # Contains Cucumber feature files
β β βββ pageActions # Contains actions to interact with web elements
β β βββ pageAsserts # Contains assertion methods for validations
β β βββ pageObject # Contains Page Object classes
β β βββ runner # Contains the TestRunner class for executing tests
β β βββ stepDefinitions # Contains step definitions for feature files
β β βββ utils # Contains utility classes
β
βββ resources
β βββ globalProperties # Configuration files for environment settings
β βββ extent.properties # Configuration for Extent Reports
β
βββ IssuesReport.md # List of known issues and resolutions
βββ UseCaseList.md # Documentation of use cases covered in automation
Before running the tests, ensure you have the following installed:
- Java JDK 8 or higher
- Maven
- IntelliJ IDEA
To run all tests, right-click on the TestRunner
class (located in src/test/java/runner/
) and select Run 'TestRunner'.
If you want to run specific tests based on tags, you can modify the @CucumberOptions
in the TestRunner
class. The available tags are:
@Regression
@CreateFolder
@CreateToDoItem
@DeleteFolder
@DeleteToDoItem
@EditFolder
@EditToDoItem
@Login
Example: To run only tests related to folder creation, update tags
in TestRunner
:
@CucumberOptions(
features = "src/test/java/feature",
glue = "stepDefinitions",
tags = "@CreateFolder"
)
Test execution results are captured using Extent Reports. After execution, reports are generated in the target/
directory.
If you'd like to contribute or report issues, feel free to update the IssuesReport.md
file or create a pull request.
Happy Testing! π