# antonyjohnsundar/e2e-test-automation-framework-ai architecture

> Architecture diagram of the GitHub repository antonyjohnsundar/e2e-test-automation-framework-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/antonyjohnsundar/e2e-test-automation-framework-ai
- Repository: https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai

## Overview

##### Main Components

- Test Runner & Execution:
- Test execution entry point (e.g., run_test.py, run_selectedsuite.py, or run_tests.py as indicated in the README).
- Integration with Pytest, since pytest.ini is present and it drives the test execution.

- Configuration:
- A “Configuration” component referencing config/config.py where global settings (base URL, browser type, AWS S3 settings, mobile device capabilities) are defined.

- Drivers:

- Utilities:
- Various utility modules such as:
▪ Logging (utils/logger.py)
▪ Video Recording (utils/video_recorder.py)
▪ Screenshot Capture (utils/screenshot.py)
▪ AWS S3 Upload (utils/aws_s3_upload.py & utils/s3upload.py)
▪ Real-time Streaming (utils/streaming.py)
▪ Self-Healing (utils/healing.py)
- Utilities under a “Support Services” node that assists the core execution by logging, capturing test evidence, and managing cloud storage.

- External Tools & Services:
- Incorporate external components:
▪ Cloud Storage (AWS S3).
▪ Mobile Appium Server.
▪ CI/CD integrations like Jenkins and GitHub Actions, plus Docker/Kubernetes for scalability.
▪ Tools for browser automation (Selenium, Playwright) and reporting (Allure/ExtentReports).

##### Relationships and Interactions

- Flow of Execution:
- The “Test Runner” initiates test cases which depend on configuration parameters (from the Config component).
- It calls the relevant driver setup (web or mobile) based on the testing requirements.
- During test execution, utilities are invoked to record videos, capture screenshots, log events, and upload artifacts to AWS S3.
- Reporting modules process the captured data to generate detailed reports.

- Also, represent interactions with external services (like AWS S3, CI/CD tools, Appium server).

##### Architectural Patterns & Design Principles

- Layered Separation:
- Clearly differentiate between the configuration/settings layer, the driver or service layer (communicating with external tools), and the utility/logic layer that supports test execution.

- Modularity:
- That drivers and utilities are designed as modular components—each responsible for a distinct aspect of the testing infrastructure.

- Extensibility:
- That the framework is built for scalability (Docker/Kubernetes ready and CI/CD integrations) which should be highlighted to show how different modules may be extended or modified without affecting others.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Test Execution Layer"
        A1["run_test.py"]:::core
        A2["run_selectedsuite.py"]:::core
    end

    subgraph "Configuration Layer"
        Config["Configuration"]:::config
    end

    subgraph "Driver Layer"
        WD["WebDriver Setup"]:::driver
        MD["Mobile Setup"]:::driver
    end

    subgraph "Utility Services"
        U1["Logger"]:::utility
        U2["Video Recorder"]:::utility
        U3["Screenshot Capture"]:::utility
        U4["AWS S3 Upload"]:::utility
        U4a["S3 Upload Helper"]:::utility
        U5["Real-time Streaming"]:::utility
        U6["Self-Healing"]:::utility
    end

    subgraph "External Services"
        ES1["AWS S3 Cloud"]:::external
        ES2["CI/CD Pipelines"]:::external
        ES3["Appium Server"]:::external
        ES4["Browser Automation Tools"]:::external
        ES5["Reporting Tools"]:::external
        ES6["Docker/Kubernetes"]:::external
    end

    %% Connections: Test Runner to Configuration
    A1 -->|"triggers"| Config
    A2 -->|"triggers"| Config

    %% Connections: Configuration to Drivers
    Config -->|"sets up"| WD
    Config -->|"sets up"| MD

    %% Connections: Drivers to Utility Services
    WD -->|"invokes"| U1
    WD -->|"invokes"| U2
    WD -->|"invokes"| U3
    WD -->|"invokes"| U4
    WD -->|"invokes"| U4a
    WD -->|"invokes"| U5
    WD -->|"invokes"| U6

    MD -->|"invokes"| U1
    MD -->|"invokes"| U2
    MD -->|"invokes"| U3
    MD -->|"invokes"| U4
    MD -->|"invokes"| U4a
    MD -->|"invokes"| U5
    MD -->|"invokes"| U6

    %% Connections: Drivers to External Tools
    WD -->|"utilizes"| ES4
    MD -->|"connects"| ES3

    %% Connections: Utility Services to External Services
    U4 -->|"uploads to"| ES1
    U4a -->|"uploads to"| ES1
    U2 -->|"sends data to"| ES5
    U3 -->|"sends data to"| ES5

    %% Connections: Test Runner to CI/CD
    A1 -->|"orchestrates"| ES2
    A2 -->|"orchestrates"| ES2

    %% Connection: CI/CD Pipelines to Scalability
    ES2 -->|"deploys via"| ES6

    %% Click Events
    click A1 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/run_test.py"
    click A2 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/run_selectedsuite.py"
    click Config "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/config/config.py"
    click WD "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/drivers/webdriver_setup.py"
    click MD "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/drivers/mobile_setup.py"
    click U1 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/logger.py"
    click U2 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/video_recorder.py"
    click U3 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/screenshot.py"
    click U4 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/aws_s3_upload.py"
    click U4a "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/s3upload.py"
    click U5 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/streaming.py"
    click U6 "https://github.com/antonyjohnsundar/e2e-test-automation-framework-ai/blob/main/utils/healing.py"

    %% Styles
    classDef core fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef config fill:#f9c74f,stroke:#333;
    classDef driver fill:#90be6d,stroke:#333;
    classDef utility fill:#577590,stroke:#333,fill-opacity:0.7;
    classDef external fill:#f94144,stroke:#333,fill-opacity:0.7;
```
