# prog420/automationexercise architecture

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

- Interactive diagram: https://gitdiagram.com/prog420/automationexercise
- Repository: https://github.com/prog420/automationexercise

## Overview

This repository is a pytest/Selenium automation project for AutomationExercise.com, with UI coverage for authentication, registration, contact, and product browsing, plus user-data helpers and an HTTP API client. The documented entry point is a pytest run. Page objects drive the site through Selenium; the API client separately creates and deletes accounts over HTTP. The sampled files establish those internal responsibilities, but not the test-to-fixture wiring, so uncertain links are omitted.

Main entry points: [`app/ui/pages/base_page.py`](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/base_page.py) (Selenium page layer), [`app/ui/locators.py`](https://github.com/prog420/automationexercise/blob/master/app/ui/locators.py) (Element locators), [`app/ui/pages/header.py`](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/header.py) (Shared navigation), [`app/ui/pages/login_page.py`](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/login_page.py) (Login and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tests["Automation suites"]
  node_suites["UI test suites"]
end

subgraph group_ui["Selenium page objects"]
  node_auth["Login and signup<br/>[login_page.py]"]
  node_signup["Account registration<br/>[signup_page.py]"]
  node_account_created["Account created"]
  node_account_deleted["Account deleted"]
  node_contact["Contact form<br/>[contact_us_page.py]"]
  node_products["Product listing<br/>[products_page.py]"]
  node_product["Product detail<br/>[product_page.py]"]
  node_home["Home page<br/>[home_page.py]"]
  node_header["Shared navigation<br/>[header.py]"]
  node_footer["Subscription footer<br/>[footer.py]"]
  node_base["Selenium page layer<br/>[base_page.py]"]
  node_locators["Element locators<br/>[locators.py]"]
end

subgraph group_data["User data and API"]
  node_user["User model<br/>[user.py]"]
  node_builder["User builder<br/>[user_builder.py]"]
  node_generator["User generator<br/>[user_generator.py]"]
  node_importer["User importer<br/>[user_importer.py]"]
  node_api["Account API client<br/>[api_client.py]"]
end

node_engineer(("Test operator"))
node_site(("AutomationExercise"))

node_engineer -->|"runs with pytest"| node_suites
node_auth -->|"accepts user"| node_user
node_signup -->|"accepts user"| node_user
node_api -->|"serializes user"| node_user
node_builder -->|"builds"| node_user
node_api -->|"sends HTTP requests"| node_site
node_base -->|"opens pages"| node_site
node_auth -->|"inherits"| node_base
node_signup -->|"inherits"| node_base
node_contact -->|"inherits"| node_base
node_products -->|"inherits"| node_base
node_product -->|"uses"| node_base
node_header -->|"inherits"| node_base
node_auth -->|"inherits"| node_header
node_signup -->|"inherits"| node_header
node_contact -->|"inherits"| node_header
node_products -->|"inherits"| node_header
node_home -->|"uses selectors"| node_locators
node_base -->|"uses selectors"| node_locators
node_header -->|"uses selectors"| node_locators
node_contact -->|"uses selectors"| node_locators
node_products -->|"uses selectors"| node_locators
node_product -->|"uses selectors"| node_locators
node_auth -->|"uses selectors"| node_locators
node_signup -->|"uses selectors"| node_locators

click node_suites "https://github.com/prog420/automationexercise/tree/master/tests/tests_ui"
click node_auth "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/login_page.py"
click node_signup "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/signup_page.py"
click node_account_created "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/account_created_page.py"
click node_account_deleted "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/account_deleted_page.py"
click node_contact "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/contact_us_page.py"
click node_products "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/products_page.py"
click node_product "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/product_page.py"
click node_home "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/home_page.py"
click node_header "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/header.py"
click node_footer "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/footer.py"
click node_base "https://github.com/prog420/automationexercise/blob/master/app/ui/pages/base_page.py"
click node_locators "https://github.com/prog420/automationexercise/blob/master/app/ui/locators.py"
click node_user "https://github.com/prog420/automationexercise/blob/master/app/models/user.py"
click node_builder "https://github.com/prog420/automationexercise/blob/master/utils/user_builder.py"
click node_generator "https://github.com/prog420/automationexercise/blob/master/utils/user_generator.py"
click node_importer "https://github.com/prog420/automationexercise/blob/master/utils/user_importer.py"
click node_api "https://github.com/prog420/automationexercise/blob/master/app/api/api_client.py"

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_suites toneBlue
class node_auth,node_signup,node_account_created,node_account_deleted,node_contact,node_products,node_product,node_home,node_header,node_footer,node_base,node_locators toneAmber
class node_user,node_builder,node_generator,node_importer,node_api toneMint
class node_engineer,node_site toneIndigo
```

## Components

### Automation suites

- [UI test suites](https://github.com/prog420/automationexercise/tree/master/tests/tests_ui): `tests/tests_ui`

### Selenium page objects

- [Login and signup](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/login_page.py): `app/ui/pages/login_page.py`
- [Account registration](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/signup_page.py): `app/ui/pages/signup_page.py`
- [Account created](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/account_created_page.py): `app/ui/pages/account_created_page.py`
- [Account deleted](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/account_deleted_page.py): `app/ui/pages/account_deleted_page.py`
- [Contact form](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/contact_us_page.py): `app/ui/pages/contact_us_page.py`
- [Product listing](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/products_page.py): `app/ui/pages/products_page.py`
- [Product detail](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/product_page.py): `app/ui/pages/product_page.py`
- [Home page](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/home_page.py): `app/ui/pages/home_page.py`
- [Shared navigation](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/header.py): `app/ui/pages/header.py`
- [Subscription footer](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/footer.py): `app/ui/pages/footer.py`
- [Selenium page layer](https://github.com/prog420/automationexercise/blob/master/app/ui/pages/base_page.py): `app/ui/pages/base_page.py`
- [Element locators](https://github.com/prog420/automationexercise/blob/master/app/ui/locators.py): `app/ui/locators.py`

### User data and API

- [User model](https://github.com/prog420/automationexercise/blob/master/app/models/user.py): `app/models/user.py`
- [User builder](https://github.com/prog420/automationexercise/blob/master/utils/user_builder.py): `utils/user_builder.py`
- [User generator](https://github.com/prog420/automationexercise/blob/master/utils/user_generator.py): `utils/user_generator.py`
- [User importer](https://github.com/prog420/automationexercise/blob/master/utils/user_importer.py): `utils/user_importer.py`
- [Account API client](https://github.com/prog420/automationexercise/blob/master/app/api/api_client.py): `app/api/api_client.py`

### Other components

- **Test operator**
- **AutomationExercise**

## Connections

- Test operator → UI test suites: runs with pytest (evidence: `README.md`)
- Login and signup → User model: accepts user (evidence: `app/ui/pages/login_page.py`)
- Account registration → User model: accepts user (evidence: `app/ui/pages/signup_page.py`)
- Account API client → User model: serializes user (evidence: `app/api/api_client.py`)
- User builder → User model: builds (evidence: `utils/user_builder.py`)
- Account API client → AutomationExercise: sends HTTP requests (evidence: `app/api/api_client.py`)
- Selenium page layer → AutomationExercise: opens pages (evidence: `app/ui/pages/base_page.py`)
- Login and signup → Selenium page layer: inherits (evidence: `app/ui/pages/login_page.py`)
- Account registration → Selenium page layer: inherits (evidence: `app/ui/pages/signup_page.py`)
- Contact form → Selenium page layer: inherits (evidence: `app/ui/pages/contact_us_page.py`)
- Product listing → Selenium page layer: inherits (evidence: `app/ui/pages/products_page.py`)
- Product detail → Selenium page layer: uses (evidence: `app/ui/pages/product_page.py`)
- Shared navigation → Selenium page layer: inherits (evidence: `app/ui/pages/header.py`)
- Login and signup → Shared navigation: inherits (evidence: `app/ui/pages/login_page.py`)
- Account registration → Shared navigation: inherits (evidence: `app/ui/pages/signup_page.py`)
- Contact form → Shared navigation: inherits (evidence: `app/ui/pages/contact_us_page.py`)
- Product listing → Shared navigation: inherits (evidence: `app/ui/pages/products_page.py`)
- Home page → Element locators: uses selectors (evidence: `app/ui/pages/home_page.py`)
- Selenium page layer → Element locators: uses selectors (evidence: `app/ui/pages/base_page.py`)
- Shared navigation → Element locators: uses selectors (evidence: `app/ui/pages/header.py`)
- Contact form → Element locators: uses selectors (evidence: `app/ui/pages/contact_us_page.py`)
- Product listing → Element locators: uses selectors (evidence: `app/ui/pages/products_page.py`)
- Product detail → Element locators: uses selectors (evidence: `app/ui/pages/product_page.py`)
- Login and signup → Element locators: uses selectors (evidence: `app/ui/pages/login_page.py`)
- Account registration → Element locators: uses selectors (evidence: `app/ui/pages/signup_page.py`)
