# shirinbashar/parabank-playwright-python architecture

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

- Interactive diagram: https://gitdiagram.com/shirinbashar/parabank-playwright-python
- Repository: https://github.com/shirinbashar/parabank-playwright-python

## Overview

This repository is a pytest/Playwright end-to-end test framework for the ParaBank demo banking application. Its user-to-result flow is to run test scenarios, use shared fixtures and page objects to drive a browser (or API request context) against ParaBank, and report test outcomes. Documented scenarios cover login, registration, and account overview; the tree also contains an API suite. The page-object implementations and fixtures are excerpted, but test bodies are not, so their specific calls are not verified.

Main entry points: [`pages/base_page.py`](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/base_page.py) (Base page helpers), [`pages/login_page.py`](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/login_page.py) (Login page), [`pages/register_page.py`](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/register_page.py) (Registration page), [`pages/account_overview_page.py`](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/account_overview_page.py) (Account overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenarios["Test scenarios"]
  node_login_tests["Login scenarios<br/>[test_login.py]"]
  node_register_tests["Registration scenarios<br/>[test_register.py]"]
  node_overview_tests["Overview scenarios"]
  node_api_tests["API scenarios<br/>[test_api.py]"]
end

subgraph group_support["Test support"]
  node_fixtures["Shared fixtures<br/>[conftest.py]"]
  node_api_context["API request context<br/>[conftest.py]"]
end

subgraph group_pages["Page objects"]
  node_base_page["Base page helpers<br/>[base_page.py]"]
  node_login_page["Login page<br/>[login_page.py]"]
  node_home_page["Home page<br/>[home_page.py]"]
  node_register_page["Registration page<br/>[register_page.py]"]
  node_overview_page["Account overview"]
end

node_pytest(("pytest runner"))
node_browser["Playwright browser page"]
node_parabank["ParaBank service"]

node_pytest -->|"runs"| node_login_tests
node_pytest -->|"runs"| node_register_tests
node_pytest -->|"runs"| node_overview_tests
node_pytest -.->|"runs"| node_api_tests
node_login_tests -.->|"uses"| node_login_page
node_register_tests -.->|"uses"| node_register_page
node_overview_tests -.->|"uses"| node_overview_page
node_fixtures -->|"creates"| node_login_page
node_fixtures -->|"receives page"| node_browser
node_api_context -->|"configures requests"| node_parabank
node_login_page -->|"inherits"| node_base_page
node_home_page -->|"inherits"| node_base_page
node_register_page -->|"inherits"| node_base_page
node_overview_page -->|"inherits"| node_base_page
node_base_page -->|"uses"| node_browser
node_login_page -->|"drives"| node_browser
node_home_page -->|"drives"| node_browser
node_register_page -->|"drives"| node_browser
node_overview_page -->|"drives"| node_browser
node_browser -.->|"visits"| node_parabank

click node_login_tests "https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_login.py"
click node_register_tests "https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_register.py"
click node_overview_tests "https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_account_overview.py"
click node_api_tests "https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_api.py"
click node_fixtures "https://github.com/shirinbashar/parabank-playwright-python/blob/main/conftest.py"
click node_api_context "https://github.com/shirinbashar/parabank-playwright-python/blob/main/conftest.py"
click node_base_page "https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/base_page.py"
click node_login_page "https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/login_page.py"
click node_home_page "https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/home_page.py"
click node_register_page "https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/register_page.py"
click node_overview_page "https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/account_overview_page.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_login_tests,node_register_tests,node_overview_tests,node_api_tests,node_browser toneBlue
class node_fixtures,node_api_context toneAmber
class node_base_page,node_login_page,node_home_page,node_register_page,node_overview_page toneMint
class node_pytest,node_parabank toneIndigo
```

## Components

### Test scenarios

- [Login scenarios](https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_login.py): `tests/test_login.py`
- [Registration scenarios](https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_register.py): `tests/test_register.py`
- [Overview scenarios](https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_account_overview.py): `tests/test_account_overview.py`
- [API scenarios](https://github.com/shirinbashar/parabank-playwright-python/blob/main/tests/test_api.py): `tests/test_api.py`

### Test support

- [Shared fixtures](https://github.com/shirinbashar/parabank-playwright-python/blob/main/conftest.py): `conftest.py`
- [API request context](https://github.com/shirinbashar/parabank-playwright-python/blob/main/conftest.py): `conftest.py`

### Page objects

- [Base page helpers](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/base_page.py): `pages/base_page.py`
- [Login page](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/login_page.py): `pages/login_page.py`
- [Home page](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/home_page.py): `pages/home_page.py`
- [Registration page](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/register_page.py): `pages/register_page.py`
- [Account overview](https://github.com/shirinbashar/parabank-playwright-python/blob/main/pages/account_overview_page.py): `pages/account_overview_page.py`

### Other components

- **pytest runner**
- **Playwright browser page**
- **ParaBank service**

## Connections

- pytest runner → Login scenarios: runs (evidence: `README.md`)
- pytest runner → Registration scenarios: runs (evidence: `README.md`)
- pytest runner → Overview scenarios: runs (evidence: `README.md`)
- pytest runner → API scenarios: runs
- Login scenarios → Login page: uses
- Registration scenarios → Registration page: uses
- Overview scenarios → Account overview: uses
- Shared fixtures → Login page: creates (evidence: `conftest.py`)
- Shared fixtures → Playwright browser page: receives page (evidence: `conftest.py`)
- API request context → ParaBank service: configures requests (evidence: `conftest.py`)
- Login page → Base page helpers: inherits (evidence: `pages/login_page.py`)
- Home page → Base page helpers: inherits (evidence: `pages/home_page.py`)
- Registration page → Base page helpers: inherits (evidence: `pages/register_page.py`)
- Account overview → Base page helpers: inherits (evidence: `pages/account_overview_page.py`)
- Base page helpers → Playwright browser page: uses (evidence: `pages/base_page.py`)
- Login page → Playwright browser page: drives (evidence: `pages/login_page.py`)
- Home page → Playwright browser page: drives (evidence: `pages/home_page.py`)
- Registration page → Playwright browser page: drives (evidence: `pages/register_page.py`)
- Account overview → Playwright browser page: drives (evidence: `pages/account_overview_page.py`)
- Playwright browser page → ParaBank service: visits
