Skip to content

πŸš€ Selenium Automation Framework with Java & Cucumber | A scalable and maintainable test automation framework using Selenium, Cucumber (BDD), Dependency Injection, Factory Design Pattern, and Page Object Model (POM). Implements SOLID principles by separating locator storage, actions, and assertions for better structure and maintainability.

Notifications You must be signed in to change notification settings

WkjuniorDiaz/Selenium-Framework-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Selenium Automation Framework

Overview

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).

Features

  • 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.

Project Structure

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

Prerequisites

Before running the tests, ensure you have the following installed:

  • Java JDK 8 or higher
  • Maven
  • IntelliJ IDEA

Running the Tests

Running All Tests

To run all tests, right-click on the TestRunner class (located in src/test/java/runner/) and select Run 'TestRunner'.

Running Tests by Tag

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"
)

Reporting

Test execution results are captured using Extent Reports. After execution, reports are generated in the target/ directory.

Contributing

If you'd like to contribute or report issues, feel free to update the IssuesReport.md file or create a pull request.


Happy Testing! πŸš€

About

πŸš€ Selenium Automation Framework with Java & Cucumber | A scalable and maintainable test automation framework using Selenium, Cucumber (BDD), Dependency Injection, Factory Design Pattern, and Page Object Model (POM). Implements SOLID principles by separating locator storage, actions, and assertions for better structure and maintainability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published