How sharathy27/modular_automation_framework works
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 TestNG Suite · Test_With_Sequential_Execution.java Sequential Web Tests · ParallelExecution_Test.java Parallel Web Tests · Mobile_Appium_Test.java Mobile Appium Tests
Components 19
Execution Control
- Maven Build · Builds and runs the TestNG automation project.
pom.xml - TestNG Suite
testng.xml - GitHub Actions
.github/workflows/test_on_push.yaml - Sequential Web Tests
src/test/java/test/Test_With_Sequential_Execution.java - Parallel Web Tests
src/test/java/test/ParallelExecution_Test.java - Mobile Appium Tests
src/test/java/test/Mobile_Appium_Test.java
Web Automation
- Web Test Base · Provides sequential web setup and teardown.
src/test/java/base/BaseTest.java - Parallel Test Base · Isolates browser state for concurrent tests.
src/test/java/base/BaseTestForParallelExecution.java - WebDriver Singleton · Centralizes WebDriver instance ownership.
src/test/java/base/Singleton_Driver.java - DemoQA Textbox Page · Encapsulates page locators and browser interactions.
src/main/java/webPages/Demo_QA_Textbox_Page.java
Mobile Automation
- Mobile Test Base
src/test/java/base/BaseTestForMobileAutomation.java - Appium Options Manager
src/main/java/utils/Appium_DriverOptionsManager.java - Appium Utility · Provides reusable device and application interactions.
src/main/java/utils/Appium_Utility.java - Appium Properties
src/test/resources/Config/appium.properties
Shared Support & Outputs
- Shared Utilities & Retry · Supplies globals, common utilities, and TestNG retry policy.
src/main/java/utils/Utilities.java - Web Configuration
src/test/resources/Config/config.properties - Spreadsheet Test Data
src/test/resources/TestData/testData.xlsx - Screenshots
src/test/resources/Screenshots - Test Reports
src/test/resources/Reports
Connections 21
- 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