# durbanoo/seleautomation-8 architecture

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

- Interactive diagram: https://gitdiagram.com/durbanoo/seleautomation-8
- Repository: https://github.com/durbanoo/seleautomation-8

## Overview

1. This repository is a Java test-automation project, not an application under test. Its core runtime is Maven + TestNG + Selenium WebDriver, with Allure used for reporting and a small amount of optional database validation through JDBC/MySQL.

2. The system boundary is straightforward: the code in this repo drives a real external site, DemoWebShop at `https://demowebshop.tricentis.com`, through ChromeDriver. The primary data flow is: TestNG test -> page object actions -> browser/UI interaction -> assertions. Failures feed into Allure attachments and screenshots.

3. The codebase is concentrated entirely under `src/test/java`; `src/main` is effectively empty. That means the repository is organized as a test framework, with no reusable production service layer. The main subsystems are tests, page objects, utilities, and listeners.

4. The Page Object Model layer is the central abstraction boundary. `BasePage` contains shared Selenium helpers, and `HomePage`, `LoginPage`, and `RegisterPage` wrap the UI elements and actions for those screens. Tests should be diagrammed as depending on page objects, not directly on locators or WebDriver operations.

5. `BaseTest` is the test bootstrap layer. It creates and tears down the browser, sets the base URL, applies timeouts, and instantiates page objects plus the DB validator. This is the primary setup/teardown boundary between TestNG lifecycle management and browser automation.

6. Test classes are grouped by user journey or feature: Home, Register, Login, plus placeholders for Product, Cart, Checkout, and Security. The implemented flows are mostly UI validation and form interaction; several classes are scaffolded but not yet implemented, which matters if you’re diagramming maturity or coverage.

7. Test data comes from two sources: static CSV input and synthetic data. `users.csv` feeds the login data provider for parameterized login tests, while `JavaFaker` generates unique registration data. The architecture therefore mixes deterministic test datasets with generated data to avoid collisions in registration flows.

8. The listener/retry subsystem is a cross-cutting concern. `TestListener` is wired through `testng.xml`, automatically adds the `Retry` analyzer, and enriches failures with screenshots, attempt counts, and page source on final failure. This is the main observability/debugging path in the framework.

9. Reporting is centered on Allure. Utility methods attach screenshots, text, and HTML source, and the tests are annotated with severity/epic/feature/story metadata. In the architecture diagram, Allure should be shown as an output sink consuming test events and attachments rather than as part of the execution path.

10. Test execution is controlled by TestNG and Maven Surefire. `testng.xml` enables class-level parallelism with multiple threads, and the Surefire plugin injects AspectJ weaving for Allure/TestNG integration. This means the framework is designed for concurrent browser test execution, with thread-safety concerns centered around per-test driver instances.

11. There is an optional database-validation boundary via `DBValidation`, which opens a MySQL connection and queries customer data by email. This is separate from the UI path and should be shown as an auxiliary verification channel, not as part of the main test flow.

12. Supporting repo artifacts suggest execution/integration infrastructure: a GitHub Actions workflow for Selenium and a Docker Compose file for environment orchestration. Even without their internal details, they indicate the project is meant to run in CI and may rely on containerized or scripted test infrastructure around the browser tests.

Main entry points: [`src/test/java/com/store/utils/BaseTest.java`](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/BaseTest.java) (Base Test), [`src/test/java/com/store/pages/BasePage.java`](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/BasePage.java) (Base Page), [`src/test/resources/allure.properties`](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/resources/allure.properties) (Allure Report), [`src/test/java/com/store/tests/HomeTest.java`](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/HomeTest.java) (Home Tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_framework["Test Framework"]
  node_listener_retry{{"Listener + Retry<br/>cross-cutting<br/>[TestListener.java]"}}
  node_base_test["Base Test<br/>test bootstrap<br/>[BaseTest.java]"]
  node_page_base["Base Page<br/>page foundation<br/>[BasePage.java]"]
  node_home_page["Home Page<br/>page object<br/>[HomePage.java]"]
  node_login_page["Login Page<br/>page object<br/>[LoginPage.java]"]
  node_register_page["Register Page<br/>page object<br/>[RegisterPage.java]"]
  node_home_tests["Home Tests<br/>ui test suite<br/>[HomeTest.java]"]
  node_register_tests["Register Tests<br/>ui test suite<br/>[RegisterTest.java]"]
  node_login_tests["Login Tests<br/>ui test suite<br/>[LoginTest.java]"]
  node_other_tests["Planned Flows<br/>scaffolded tests"]
  node_csv_data["CSV Users<br/>static data<br/>[users.csv]"]
  node_data_providers["Data Providers<br/>test data<br/>[DataProviders.java]"]
  node_csv_helper["CSV Helper<br/>data loader<br/>[CsvData.java]"]
  node_faker_data["Faker Data<br/>generated data<br/>[DataProviders.java]"]
  node_allure_utils["Allure Utils<br/>reporting helper<br/>[AllureUtils.java]"]
  node_db_validation["DB Validation<br/>aux verification<br/>[DBValidation.java]"]
end

subgraph group_grp_external["External Systems"]
  node_allure_report["Allure Report<br/>report sink<br/>[allure.properties]"]
  node_browser_site(("DemoWebShop<br/>target site"))
  node_browser_driver(("ChromeDriver<br/>browser runtime"))
end

subgraph group_grp_infra["Execution Infra"]
  node_maven_surefire["Maven Surefire<br/>build runner<br/>[pom.xml]"]
  node_testng_suite["TestNG Suite<br/>test orchestrator<br/>[testng.xml]"]
  node_ci_env["CI / Compose<br/>execution env<br/>[selenium.yml]"]
end

node_maven_surefire -->|"launches"| node_testng_suite
node_testng_suite -->|"registers"| node_listener_retry
node_testng_suite -->|"executes"| node_base_test
node_base_test -->|"creates"| node_browser_driver
node_browser_driver -->|"drives"| node_browser_site
node_base_test -->|"initializes"| node_page_base
node_page_base -->|"supports"| node_home_page
node_page_base -->|"supports"| node_login_page
node_page_base -->|"supports"| node_register_page
node_home_tests -->|"uses"| node_home_page
node_register_tests -->|"uses"| node_register_page
node_login_tests -->|"uses"| node_login_page
node_home_tests -->|"consumes"| node_data_providers
node_login_tests -->|"consumes"| node_csv_data
node_csv_data -->|"loaded by"| node_csv_helper
node_register_tests -->|"generates"| node_faker_data
node_listener_retry -->|"attaches"| node_allure_utils
node_allure_utils -->|"publishes"| node_allure_report
node_home_tests -.->|"annotated for"| node_allure_report
node_register_tests -.->|"annotated for"| node_allure_report
node_login_tests -.->|"annotated for"| node_allure_report
node_base_test -.->|"optionally uses"| node_db_validation
node_db_validation -.->|"verifies against"| node_browser_site
node_ci_env -->|"runs"| node_maven_surefire
node_ci_env -->|"provisions"| node_browser_driver
node_other_tests -.->|"would use"| node_base_test

click node_maven_surefire "https://github.com/durbanoo/seleautomation-8/blob/master/pom.xml"
click node_testng_suite "https://github.com/durbanoo/seleautomation-8/blob/master/testng.xml"
click node_listener_retry "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/listeners/TestListener.java"
click node_base_test "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/BaseTest.java"
click node_page_base "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/BasePage.java"
click node_home_page "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/HomePage.java"
click node_login_page "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/LoginPage.java"
click node_register_page "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/RegisterPage.java"
click node_home_tests "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/HomeTest.java"
click node_register_tests "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/RegisterTest.java"
click node_login_tests "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/LoginTest.java"
click node_csv_data "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/resources/users.csv"
click node_data_providers "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DataProviders.java"
click node_csv_helper "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/CsvData.java"
click node_faker_data "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DataProviders.java"
click node_allure_utils "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/AllureUtils.java"
click node_allure_report "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/resources/allure.properties"
click node_db_validation "https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DBValidation.java"
click node_ci_env "https://github.com/durbanoo/seleautomation-8/blob/master/.github/workflows/selenium.yml"

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_listener_retry,node_base_test,node_page_base,node_home_page,node_login_page,node_register_page,node_home_tests,node_register_tests,node_login_tests,node_other_tests,node_csv_data,node_data_providers,node_csv_helper,node_faker_data,node_allure_utils,node_db_validation toneBlue
class node_allure_report,node_browser_site,node_browser_driver toneAmber
class node_maven_surefire,node_testng_suite,node_ci_env toneMint
```

## Components

### Test Framework

Core test automation code under src/test/java.

- [Listener + Retry](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/listeners/TestListener.java): cross-cutting · Captures failures, retries tests, and enriches final failures with diagnostics. · `src/test/java/com/store/listeners/TestListener.java`
- [Base Test](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/BaseTest.java): test bootstrap · Creates browser sessions, sets base URL/timeouts, and manages teardown. · `src/test/java/com/store/utils/BaseTest.java`
- [Base Page](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/BasePage.java): page foundation · Shared Selenium helpers used by all page objects. · `src/test/java/com/store/pages/BasePage.java`
- [Home Page](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/HomePage.java): page object · Encapsulates home-screen actions and assertions. · `src/test/java/com/store/pages/HomePage.java`
- [Login Page](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/LoginPage.java): page object · Encapsulates login form interactions and validation. · `src/test/java/com/store/pages/LoginPage.java`
- [Register Page](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/pages/RegisterPage.java): page object · Encapsulates registration form interactions and validation. · `src/test/java/com/store/pages/RegisterPage.java`
- [Home Tests](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/HomeTest.java): ui test suite · Checks home-page behavior and navigation. · `src/test/java/com/store/tests/HomeTest.java`
- [Register Tests](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/RegisterTest.java): ui test suite · Covers registration flows using generated user data. · `src/test/java/com/store/tests/RegisterTest.java`
- [Login Tests](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/tests/LoginTest.java): ui test suite · Covers login flows and parameterized credential cases. · `src/test/java/com/store/tests/LoginTest.java`
- **Planned Flows**: scaffolded tests · Placeholder coverage for product, cart, checkout, and security journeys.
- [CSV Users](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/resources/users.csv): static data · Login dataset loaded from users.csv. · `src/test/resources/users.csv`
- [Data Providers](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DataProviders.java): test data · Supplies parameterized inputs and synthetic registration data. · `src/test/java/com/store/utils/DataProviders.java`
- [CSV Helper](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/CsvData.java): data loader · Reads structured test data from CSV. · `src/test/java/com/store/utils/CsvData.java`
- [Faker Data](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DataProviders.java): generated data · Creates unique test identities to avoid registration collisions. · `src/test/java/com/store/utils/DataProviders.java`
- [Allure Utils](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/AllureUtils.java): reporting helper · Attaches screenshots, text, and HTML source to Allure reports. · `src/test/java/com/store/utils/AllureUtils.java`
- [DB Validation](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/java/com/store/utils/DBValidation.java): aux verification · Queries MySQL for customer records by email as an optional check. · `src/test/java/com/store/utils/DBValidation.java`

### External Systems

Browser, target site, and optional backend validation endpoints.

- [Allure Report](https://github.com/durbanoo/seleautomation-8/blob/master/src/test/resources/allure.properties): report sink · Consumes annotations and attachments for test reporting. · `src/test/resources/allure.properties`
- **DemoWebShop**: target site · External UI under test at demowebshop.tricentis.com in ChromeDriver.
- **ChromeDriver**: browser runtime · Per-test browser instance used for UI automation.

### Execution Infra

Build, suite, and environment orchestration around the tests.

- [Maven Surefire](https://github.com/durbanoo/seleautomation-8/blob/master/pom.xml): build runner · Runs the TestNG suite and enables AspectJ weaving for reporting integration. · `pom.xml`
- [TestNG Suite](https://github.com/durbanoo/seleautomation-8/blob/master/testng.xml): test orchestrator · Defines parallel class execution and wires listeners through the suite XML. · `testng.xml`
- [CI / Compose](https://github.com/durbanoo/seleautomation-8/blob/master/.github/workflows/selenium.yml): execution env · GitHub Actions and Docker Compose provide automated execution and environment orchestration. · `.github/workflows/selenium.yml`

## Connections

- Maven Surefire → TestNG Suite: launches · Surefire starts the TestNG suite.
- TestNG Suite → Listener + Retry: registers · Suite configuration wires the listener and retry logic.
- TestNG Suite → Base Test: executes · TestNG runs classes built on the shared test bootstrap.
- Base Test → ChromeDriver: creates · Bootstrap manages per-test browser sessions.
- ChromeDriver → DemoWebShop: drives · Browser actions hit the external DemoWebShop site.
- Base Test → Base Page: initializes · Base test prepares the page-object foundation.
- Base Page → Home Page: supports · Shared helpers back the concrete page objects.
- Base Page → Login Page: supports · Shared helpers back the concrete page objects.
- Base Page → Register Page: supports · Shared helpers back the concrete page objects.
- Home Tests → Home Page: uses · Home tests interact through the page object boundary.
- Register Tests → Register Page: uses · Registration tests interact through the page object boundary.
- Login Tests → Login Page: uses · Login tests interact through the page object boundary.
- Home Tests → Data Providers: consumes · Tests can source structured inputs from providers.
- Login Tests → CSV Users: consumes · Login flows use CSV-backed credentials.
- CSV Users → CSV Helper: loaded by · CSV helper parses the test dataset.
- Register Tests → Faker Data: generates · Registration flows rely on synthetic unique data.
- Listener + Retry → Allure Utils: attaches · Failures are enriched with screenshots and page source.
- Allure Utils → Allure Report: publishes · Attachments and metadata flow into Allure.
- Home Tests → Allure Report: annotated for · Tests carry epic/feature/story/severity metadata.
- Register Tests → Allure Report: annotated for · Tests carry epic/feature/story/severity metadata.
- Login Tests → Allure Report: annotated for · Tests carry epic/feature/story/severity metadata.
- Base Test → DB Validation: optionally uses · Some flows can validate user data through MySQL.
- DB Validation → DemoWebShop: verifies against · Database checks complement the UI path, not replace it.
- CI / Compose → Maven Surefire: runs · Workflow and containerized setup invoke the Maven test run.
- CI / Compose → ChromeDriver: provisions · CI environment supports browser automation execution.
- Planned Flows → Base Test: would use · Planned feature suites follow the same bootstrap pattern.
