Skip to main content

Architecture Overview

TAFLEX is built on a robust, extensible architecture that follows enterprise-grade design patterns. This document explains the architectural decisions and how different components interact.

Design Philosophyโ€‹

TAFLEX follows these core principles:

PrincipleDescription
๐Ÿงฉ Strategy PatternRuntime driver resolution allows the same test code to run on Web, API, or Mobile without modification.
๐Ÿ“„ Separation of ConcernsTest logic is completely decoupled from driver implementation and locator definitions.
โš™๏ธ Configuration Over CodeBehavior is controlled through external configuration, not hardcoded values.
๐Ÿงช Modern JavaLeverages Java 21 features for clean and efficient automation code.

High-Level Architectureโ€‹

Component Breakdownโ€‹

1. Driver Layerโ€‹

The Driver Layer implements the Strategy Pattern, allowing runtime selection of the appropriate driver implementation based on the execution.mode property.

2. Locator Systemโ€‹

All locators are externalized in .properties files and resolved by the LocatorFactory.

Locator Loading Order:

  1. global.properties - Common across all modes.
  2. {mode}/common.properties - Mode-specific common locators.
  3. {mode}/{page}.properties - Page/feature-specific locators.

3. Configuration Managementโ€‹

The ConfigManager provides centralized access to properties defined in automation.properties, with support for environment variable overrides.

4. Test Execution Flowโ€‹

  1. Suite Start: TestNG starts the execution.
  2. Setup: BaseTest calls DriverFactory to get the correct driver instance.
  3. Initialization: The driver initializes the underlying tool (Playwright, HttpClient, or Appium).
  4. Execution: Tests interact with the AutomationDriver using logical locator names.
  5. Teardown: BaseTest terminates the driver and reports results.

Technology Stackโ€‹

CategoryTechnologies
Core LanguageJava 21+
Build ToolGradle 8.5
Test RunnerTestNG
Web TestingPlaywright for Java
API TestingApache HttpClient
Mobile TestingAppium (Java Client)
DatabaseHikariCP, JDBC
ReportingReportPortal, Xray Cloud
LoggingSLF4J with Logback