# sharathy27/modular_automation_framework architecture

> Architecture diagram of the GitHub repository sharathy27/modular_automation_framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sharathy27/modular_automation_framework
- Repository: https://github.com/sharathy27/modular_automation_framework

## Overview

#### Purpose and execution model
This is a Java/TestNG automation project demonstrating three UI-test modes: sequential web execution, parallel web execution, and Appium mobile automation. Maven is the build/runtime entry point (`pom.xml`); TestNG suite selection is defined in `testng.xml`. CI runs through GitHub Actions (`.github/workflows/test_on_push.yaml`).

#### Test scenarios
Concrete test classes drive the supported execution modes:
- Sequential browser tests: `src/test/java/test/Test_With_Sequential_Execution.java`
- Parallel browser tests: `src/test/java/test/ParallelExecution_Test.java`
- Mobile/Appium tests: `src/test/java/test/Mobile_Appium_Test.java`

These tests are the top-level control layer: they inherit setup/teardown behavior from base classes and interact with page objects or mobile utility methods.

#### Test lifecycle and driver ownership
The base-test package establishes environment setup, teardown, and driver scope:
- `src/test/java/base/BaseTest.java`
- `src/test/java/base/BaseTestForParallelExecution.java`
- `src/test/java/base/BaseTestForMobileAutomation.java`

`src/test/java/base/Singleton_Driver.java` centralizes WebDriver instance ownership. The separate parallel base class is an important concurrency boundary: browser state must be isolated per concurrent test rather than shared through a global singleton.

#### Web UI page-object boundary
`src/main/java/webPages/Demo_QA_Textbox_Page.java` represents the web-page abstraction. Tests should invoke page-level actions and assertions through this layer rather than coupling directly to locators, keeping browser automation details out of test orchestration.

#### Appium mobile automation
Mobile execution is configured and mediated by:
- `src/main/java/utils/Appium_DriverOptionsManager.java`
- `src/main/java/utils/Appium_Utility.java`
- `src/test/resources/Config/appium.properties`

This boundary translates mobile configuration into Appium driver options/session setup and provides reusable device/application interactions. It requires an externally available Appium server plus configured device/emulator and target app context.

#### Shared configuration, utilities, and resilience
Cross-cutting behavior resides in:
- `src/main/java/utils/GlobalVariables.java`
- `src/main/java/utils/Utilities.java`
- `src/main/java/utils/RetryAnalyzer.java`

`config.properties` supplies non-mobile test configuration (`src/test/resources/Config/config.properties`). `RetryAnalyzer` is the TestNG failure-retry policy boundary; utility/global layers likely provide common configuration access, waits, browser operations, or shared constants.

#### Test inputs and output artifacts
Tests consume spreadsheet data from `src/test/resources/TestData/testData.xlsx`. Runtime evidence is written under `src/test/resources/Screenshots` and report assets under `src/test/resources/Reports`, including `dashboard.html` and `index.html`. These are output boundaries for debugging and result consumption, not core test-control logic.

Main entry points: [`testng.xml`](https://github.com/sharathy27/modular_automation_framework/blob/main/testng.xml) (TestNG Suite), [`src/test/java/test/Test_With_Sequential_Execution.java`](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Test_With_Sequential_Execution.java) (Sequential Web Tests), [`src/test/java/test/ParallelExecution_Test.java`](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/ParallelExecution_Test.java) (Parallel Web Tests), [`src/test/java/test/Mobile_Appium_Test.java`](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Mobile_Appium_Test.java) (Mobile Appium Tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Execution Control"]
  node_maven{{"Maven Build<br/>build entry point<br/>[pom.xml]"}}
  node_testng["TestNG Suite<br/>suite selection<br/>[testng.xml]"]
  node_ci{{"GitHub Actions<br/>CI workflow<br/>[test_on_push.yaml]"}}
  node_sequential_test["Sequential Web Tests<br/>TestNG test class"]
  node_parallel_test["Parallel Web Tests<br/>TestNG test class"]
  node_mobile_test["Mobile Appium Tests<br/>TestNG test class"]
end

subgraph group_web["Web Automation"]
  node_base_test["Web Test Base<br/>lifecycle base<br/>[BaseTest.java]"]
  node_parallel_base["Parallel Test Base<br/>concurrency boundary"]
  node_web_driver["WebDriver Singleton<br/>driver ownership"]
  node_page_object["DemoQA Textbox Page<br/>page object"]
end

subgraph group_mobile["Mobile Automation"]
  node_mobile_base["Mobile Test Base<br/>lifecycle base"]
  node_appium_options["Appium Options Manager<br/>session configuration"]
  node_appium_utility["Appium Utility<br/>mobile interaction layer"]
  node_mobile_config["Appium Properties<br/>mobile configuration<br/>[appium.properties]"]
end

subgraph group_shared["Shared Support &amp; Outputs"]
  node_shared_support["Shared Utilities &amp; Retry<br/>cross-cutting support<br/>[Utilities.java]"]
  node_web_config["Web Configuration<br/>test configuration<br/>[config.properties]"]
  node_test_data["Spreadsheet Test Data<br/>test input<br/>[testData.xlsx]"]
  node_evidence["Screenshots<br/>runtime evidence"]
  node_reports["Test Reports<br/>result artifacts"]
end

node_ci -->|"runs"| node_maven
node_maven -->|"executes"| node_testng
node_testng -->|"selects"| node_sequential_test
node_testng -->|"selects"| node_parallel_test
node_testng -->|"selects"| node_mobile_test
node_sequential_test -->|"inherits lifecycle"| node_base_test
node_parallel_test -->|"inherits lifecycle"| node_parallel_base
node_mobile_test -->|"inherits lifecycle"| node_mobile_base
node_base_test -->|"uses"| node_web_driver
node_parallel_base -.->|"isolates driver scope"| node_web_driver
node_sequential_test -->|"drives UI through"| node_page_object
node_parallel_test -->|"drives UI through"| node_page_object
node_mobile_base -->|"creates session options"| node_appium_options
node_appium_options -->|"reads"| node_mobile_config
node_mobile_test -->|"uses"| node_appium_utility
node_sequential_test -->|"uses retry and utilities"| node_shared_support
node_parallel_test -->|"uses retry and utilities"| node_shared_support
node_base_test -->|"reads"| node_web_config
node_sequential_test -->|"consumes"| node_test_data
node_shared_support -->|"writes"| node_evidence
node_testng -->|"produces"| node_reports

click node_maven "https://github.com/sharathy27/modular_automation_framework/blob/main/pom.xml"
click node_testng "https://github.com/sharathy27/modular_automation_framework/blob/main/testng.xml"
click node_ci "https://github.com/sharathy27/modular_automation_framework/blob/main/.github/workflows/test_on_push.yaml"
click node_sequential_test "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Test_With_Sequential_Execution.java"
click node_parallel_test "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/ParallelExecution_Test.java"
click node_mobile_test "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Mobile_Appium_Test.java"
click node_base_test "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTest.java"
click node_parallel_base "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTestForParallelExecution.java"
click node_web_driver "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/Singleton_Driver.java"
click node_page_object "https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/webPages/Demo_QA_Textbox_Page.java"
click node_mobile_base "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTestForMobileAutomation.java"
click node_appium_options "https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Appium_DriverOptionsManager.java"
click node_appium_utility "https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Appium_Utility.java"
click node_mobile_config "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/Config/appium.properties"
click node_shared_support "https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Utilities.java"
click node_web_config "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/Config/config.properties"
click node_test_data "https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/TestData/testData.xlsx"
click node_evidence "https://github.com/sharathy27/modular_automation_framework/tree/main/src/test/resources/Screenshots"
click node_reports "https://github.com/sharathy27/modular_automation_framework/tree/main/src/test/resources/Reports"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_maven,node_testng,node_ci,node_sequential_test,node_parallel_test,node_mobile_test toneBlue
class node_base_test,node_parallel_base,node_web_driver,node_page_object toneAmber
class node_mobile_base,node_appium_options,node_appium_utility,node_mobile_config toneMint
class node_shared_support,node_web_config,node_test_data,node_evidence,node_reports toneRose
```

## Components

### Execution Control

- [Maven Build](https://github.com/sharathy27/modular_automation_framework/blob/main/pom.xml): build entry point · Builds and runs the TestNG automation project. · `pom.xml`
- [TestNG Suite](https://github.com/sharathy27/modular_automation_framework/blob/main/testng.xml): suite selection · `testng.xml`
- [GitHub Actions](https://github.com/sharathy27/modular_automation_framework/blob/main/.github/workflows/test_on_push.yaml): CI workflow · `.github/workflows/test_on_push.yaml`
- [Sequential Web Tests](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Test_With_Sequential_Execution.java): TestNG test class · `src/test/java/test/Test_With_Sequential_Execution.java`
- [Parallel Web Tests](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/ParallelExecution_Test.java): TestNG test class · `src/test/java/test/ParallelExecution_Test.java`
- [Mobile Appium Tests](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/test/Mobile_Appium_Test.java): TestNG test class · `src/test/java/test/Mobile_Appium_Test.java`

### Web Automation

- [Web Test Base](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTest.java): lifecycle base · Provides sequential web setup and teardown. · `src/test/java/base/BaseTest.java`
- [Parallel Test Base](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTestForParallelExecution.java): concurrency boundary · Isolates browser state for concurrent tests. · `src/test/java/base/BaseTestForParallelExecution.java`
- [WebDriver Singleton](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/Singleton_Driver.java): driver ownership · Centralizes WebDriver instance ownership. · `src/test/java/base/Singleton_Driver.java`
- [DemoQA Textbox Page](https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/webPages/Demo_QA_Textbox_Page.java): page object · Encapsulates page locators and browser interactions. · `src/main/java/webPages/Demo_QA_Textbox_Page.java`

### Mobile Automation

- [Mobile Test Base](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/java/base/BaseTestForMobileAutomation.java): lifecycle base · `src/test/java/base/BaseTestForMobileAutomation.java`
- [Appium Options Manager](https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Appium_DriverOptionsManager.java): session configuration · `src/main/java/utils/Appium_DriverOptionsManager.java`
- [Appium Utility](https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Appium_Utility.java): mobile interaction layer · Provides reusable device and application interactions. · `src/main/java/utils/Appium_Utility.java`
- [Appium Properties](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/Config/appium.properties): mobile configuration · `src/test/resources/Config/appium.properties`

### Shared Support & Outputs

- [Shared Utilities & Retry](https://github.com/sharathy27/modular_automation_framework/blob/main/src/main/java/utils/Utilities.java): cross-cutting support · Supplies globals, common utilities, and TestNG retry policy. · `src/main/java/utils/Utilities.java`
- [Web Configuration](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/Config/config.properties): test configuration · `src/test/resources/Config/config.properties`
- [Spreadsheet Test Data](https://github.com/sharathy27/modular_automation_framework/blob/main/src/test/resources/TestData/testData.xlsx): test input · `src/test/resources/TestData/testData.xlsx`
- [Screenshots](https://github.com/sharathy27/modular_automation_framework/tree/main/src/test/resources/Screenshots): runtime evidence · `src/test/resources/Screenshots`
- [Test Reports](https://github.com/sharathy27/modular_automation_framework/tree/main/src/test/resources/Reports): result artifacts · `src/test/resources/Reports`

## Connections

- GitHub Actions → Maven Build: runs
- Maven Build → TestNG Suite: executes
- TestNG Suite → Sequential Web Tests: selects
- TestNG Suite → Parallel Web Tests: selects
- TestNG Suite → Mobile Appium Tests: selects
- Sequential Web Tests → Web Test Base: inherits lifecycle
- Parallel Web Tests → Parallel Test Base: inherits lifecycle
- Mobile Appium Tests → Mobile Test Base: inherits lifecycle
- Web Test Base → WebDriver Singleton: uses
- Parallel Test Base → WebDriver Singleton: isolates driver scope
- Sequential Web Tests → DemoQA Textbox Page: drives UI through
- Parallel Web Tests → DemoQA Textbox Page: drives UI through
- Mobile Test Base → Appium Options Manager: creates session options
- Appium Options Manager → Appium Properties: reads
- Mobile Appium Tests → Appium Utility: uses
- Sequential Web Tests → Shared Utilities & Retry: uses retry and utilities
- Parallel Web Tests → Shared Utilities & Retry: uses retry and utilities
- Web Test Base → Web Configuration: reads
- Sequential Web Tests → Spreadsheet Test Data: consumes
- Shared Utilities & Retry → Screenshots: writes
- TestNG Suite → Test Reports: produces
