# rohinegi548/cucumber-bdd-automation-framework architecture

> Architecture diagram of the GitHub repository rohinegi548/cucumber-bdd-automation-framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohinegi548/cucumber-bdd-automation-framework
- Repository: https://github.com/rohinegi548/cucumber-bdd-automation-framework

## Overview

##### Project type and purpose
- This is a Cucumber-BDD Selenium-based automation framework implemented in Java with Maven.
- Purpose: automate web UI tests using Feature files (Gherkin), step definitions, Page Object Model, and generate rich HTML reports (Cucumber reports + Allure).

##### File structure
- Top-level:
- pom.xml (Maven build & plugins)
- log4j.properties (logging)
- src/main/java/com/cucumberFramework – core code
– enums (Browsers, OS)
– helper (constants, logger, explicit waits)
– pageObjects (Page Object Model classes)
– stepdefinitions (Cucumber glue code + ServiceHooks for setup/teardown)
– testBase (TestBase: WebDriver setup & config)
– testRunner (TestRunner: Cucumber + TestNG runner)
- src/test/resources
– drivers (ChromeDriver binaries)
– features (Gherkin .feature files)
- Reports & outputs: target/ and test-output/ containing Cucumber-reports, allure JSON, advanced reports, TestNG/Surefire HTML.
- Execution Demo (video) & images folder for documentation.

##### README insights
- Describes the two sample scenarios (simple login + parameterized search).
- Lists Maven goals: mvn clean test, mvn site.
- Explains reporting plugins:
- net.masterthought:maven-cucumber-reporting
- ru.yandex.qatools.allure:cucumber-jvm-adaptor + allure-maven-plugin
- Mentions Jetty plugin for local hosting of Allure report.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External source
    GitHub["GitHub (Repo)"]:::external
    GitClone["git clone"]:::external

    %% Build & CI
    subgraph "Build & CI" 
        Pom["pom.xml"]:::build
        TestNGConf["testNg.xml"]:::build
        MVNCleanTest["mvn clean test"]:::build
        MVNSite["mvn site"]:::build
    end

    %% Source folders
    subgraph "Source Code"
        direction TB
        subgraph "src/main/java/com/cucumberFramework"
            direction TB
            StepDefs["Step Definitions & ServiceHooks"]:::code
            PageObjs["Page Object Model layer"]:::code
            Helpers["Helper & Utility classes"]:::code
            Enums["Enums (Browsers, OS)"]:::code
            TestBase["TestBase (WebDriver Init)"]:::code
            TestRunner["Cucumber Engine & TestRunner"]:::code
        end
        subgraph "src/test/resources"
            direction TB
            Features["Feature Files (Gherkin)"]:::code
            Drivers["Selenium WebDriver binaries"]:::runtime
        end
    end

    %% Execution & runtime
    subgraph "Runtime & Execution"
        direction TB
        Surefire["Surefire Plugin"]:::build
        CucumberEngine["Cucumber Engine"]:::code
        WebDriver["Selenium WebDriver"]:::runtime
        Browser["Browser Instance"]:::runtime
    end

    %% Reporting
    subgraph "Reporting"
        direction TB
        CucumberJSON["Cucumber JSON Results"]:::report
        CucumberHTML["Cucumber HTML Reports"]:::report
        AllureResults["Allure Results (JSON)"]:::report
        AllureSite["Allure HTML Site"]:::report
        Jetty["Jetty Server (optional)"]:::report
    end

    %% Flow connections
    GitHub -->|clone| GitClone
    GitClone --> Pom
    Pom -->|invokes| MVNCleanTest
    MVNCleanTest --> Surefire
    Surefire --> TestRunner
    TestRunner -->|loads| Features
    TestRunner --> CucumberEngine
    CucumberEngine --> StepDefs
    StepDefs --> PageObjs
    StepDefs --> Helpers
    StepDefs --> Enums
    PageObjs --> TestBase
    TestBase --> Drivers
    TestBase --> WebDriver
    WebDriver --> Browser
    TestRunner -->|produce| CucumberJSON
    CucumberJSON --> CucumberHTML
    CucumberJSON --> AllureResults
    Pom -->|invokes| MVNSite
    MVNSite --> CucumberHTML
    MVNSite --> AllureSite
    AllureSite --> Jetty

    %% Click events
    click Features "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/test/resources/features"
    click TestRunner "https://github.com/rohinegi548/cucumber-bdd-automation-framework/blob/master/src/main/java/com/cucumberFramework/testRunner/TestRunner.java"
    click StepDefs "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/main/java/com/cucumberFramework/stepdefinitions"
    click PageObjs "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/main/java/com/cucumberFramework/pageObjects"
    click Helpers "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/main/java/com/cucumberFramework/helper"
    click Enums "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/main/java/com/cucumberFramework/enums"
    click TestBase "https://github.com/rohinegi548/cucumber-bdd-automation-framework/blob/master/src/main/java/com/cucumberFramework/testBase/TestBase.java"
    click Drivers "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/src/test/resources/drivers"
    click Pom "https://github.com/rohinegi548/cucumber-bdd-automation-framework/blob/master/pom.xml"
    click CucumberHTML "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/target/cucumber-reports"
    click AllureResults "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/target/allure-results"
    click AllureSite "https://github.com/rohinegi548/cucumber-bdd-automation-framework/tree/master/target/site/allure-maven-plugin"

    %% Styles
    classDef code fill:#9f6,stroke:#080,stroke-width:1px;
    classDef runtime fill:#6bf,stroke:#039,stroke-width:1px;
    classDef report fill:#f90,stroke:#c60,stroke-width:1px;
    classDef build fill:#ccc,stroke:#888,stroke-width:1px;
    classDef external fill:#bbb,stroke:#666,stroke-width:1px;
```
