# pkushal05/testing-automation architecture

> Architecture diagram of the GitHub repository pkushal05/testing-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pkushal05/testing-automation
- Repository: https://github.com/pkushal05/testing-automation

## Overview

##### Project type and purpose
- This is a **test automation framework** for the “Guru99 Demo Banking Site,” implemented in **Python** using **Selenium WebDriver** and **PyTest**. Its goal is end-to-end automation of banking functions (customer/account management, statements, balance checks).

##### File structure
- Top-level directories:
- Account/ (tests for new/edit/delete account)
- Customer/ (tests for new/edit/delete customer)
- BankStatement/ (tests for balance enquiry, mini/customized statements)
- Unittests/ (contains test_suites.py—menu-based suite orchestrator)
- No explicit “page_objects” folder was shown, but the README implies modular, reusable code—typically a **Page Object Model (POM)** pattern.
- Configuration points: setUp_Class in each test for manager credentials; Excel test-data reference; pytest runner; ChromeDriver.

##### README for technical stack & architecture hints
- **Tools & Technologies**: Python, Selenium WebDriver, PyTest, ChromeDriver, Excel for data, Markdown for docs, screenshots for reports.
- **Modules**: 9 automated test areas (New/Edit/Delete Customer & Account; Balance Enquiry; Mini/Customized Statement).
- **Patterns**: modular reusable code, explicit waits, dynamic locators → suggests POM + utilities layer.

##### Main components & interactions
a. Components
1. Test Runner (PyTest CLI or test_suites.py menu)
2. Test Suites (Unittests/test_suites.py)
3. Test Modules (Account, Customer, BankStatement folders)
4. Page Objects & Utilities (not shown in tree but implied)
5. WebDriver Manager (initializes ChromeDriver sessions)
6. Test Data (Excel sheets)
7. System Under Test (SUT: Guru99 web app)
8. Reporting & Logging (screenshots, pytest-html or logs)
9. Version Control (GitHub) & CI/CD (optional)
b. Relationships
- Test Runner invokes Test Suites → loads Test Modules
- Each Test Module uses Page Objects & Utilities
- Page Objects call WebDriver Manager → launches ChromeDriver → drives browser → interacts with SUT
- Test Data is fed into tests via Utilities
- SUT responds → Page Objects capture responses/assertions → Test Runner records results
- On failures, screenshots & logs are generated → aggregated by Reporting component
c. Architectural patterns / design principles
- **Page Object Model** to encapsulate page-specific locators & actions
- **Test Suite Orchestration** via menu-based runner (Unittests/test_suites.py)
- **Separation of Concerns**: test code, page objects, test data, utilities, config
- **Modularity**: business modules mapped to folder structure
d. Key technologies / libraries
- Selenium WebDriver (browser automation)
- PyTest (test runner/fixtures/assertions)
- Excel handling library (e.g., openpyxl)
- ChromeDriver (browser binary)
- Logging & screenshot utilities

## Diagram (Mermaid)

```mermaid
flowchart TD
    PyTestRunner["PyTest Runner"]:::testArtifact
    TestSuite["Test Suite Manager"]:::testArtifact
    subgraph "Test Modules"
        AccountModule["Account Test Module"]:::testArtifact
        CustomerModule["Customer Test Module"]:::testArtifact
        BankStatementModule["BankStatement Test Module"]:::testArtifact
    end
    PageObjects["Page Object Library"]:::support
    Utils["Utilities"]:::support
    ExcelData["Excel Test Data"]:::data
    WebDriverMgr["WebDriver Manager"]:::support
    ChromeDriver["ChromeDriver"]:::external
    Browser["Browser"]:::external
    SUT["Guru99 Demo Banking Site"]:::external
    Reporting["Reporting & Logging"]:::reporting
    subgraph "Configuration & Documentation"
        README["README.md"]:::data
        Gitignore[".gitignore"]:::data
    end

    PyTestRunner -->|invokes| TestSuite
    TestSuite -->|loads| AccountModule
    TestSuite -->|loads| CustomerModule
    TestSuite -->|loads| BankStatementModule
    AccountModule -->|uses| PageObjects
    CustomerModule -->|uses| PageObjects
    BankStatementModule -->|uses| PageObjects
    PageObjects -->|calls| WebDriverMgr
    WebDriverMgr -->|manages| ChromeDriver
    ChromeDriver -->|drives| Browser
    Browser -->|interacts with| SUT
    SUT -->|responds to| PageObjects
    PyTestRunner -->|generates| Reporting
    ExcelData -->|provided via| Utils
    Utils -->|feeds data to| AccountModule
    Utils -->|feeds data to| CustomerModule
    Utils -->|feeds data to| BankStatementModule

    click PyTestRunner "https://github.com/pkushal05/testing-automation/tree/main/Project Root"
    click TestSuite "https://github.com/pkushal05/testing-automation/blob/main/Unittests/test_suites.py"
    click AccountModule "https://github.com/pkushal05/testing-automation/tree/main/Account/"
    click CustomerModule "https://github.com/pkushal05/testing-automation/tree/main/Customer/"
    click BankStatementModule "https://github.com/pkushal05/testing-automation/tree/main/BankStatement/"
    click README "https://github.com/pkushal05/testing-automation/blob/main/README.md"
    click Gitignore "https://github.com/pkushal05/testing-automation/blob/main/.gitignore"

    classDef testArtifact fill:#D6EFFF,stroke:#000
    classDef support fill:#D6FFD6,stroke:#000
    classDef external fill:#E0E0E0,stroke:#000
    classDef data fill:#FFF5BA,stroke:#000
    classDef reporting fill:#FFD6D6,stroke:#000
```
