# sivaprkolli/playwright_framework architecture

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

- Interactive diagram: https://gitdiagram.com/sivaprkolli/playwright_framework
- Repository: https://github.com/sivaprkolli/playwright_framework

## Overview

This repository is a Playwright/TypeScript test framework for exercising a web application through UI and API tests. Its user-to-result workflow is to run a selected test suite, use page objects and shared test support where applicable, and produce test reports. The README also describes configurable environments, authentication fixtures, cross-browser and parallel runs, traces, and screenshots. Several test and support files are not excerpted, so their internal calls and sequencing are not asserted here.

Main entry points: [`src/pages/BasePage.ts`](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/BasePage.ts) (Page interactions), [`playwright.config.ts`](https://github.com/sivaprkolli/playwright_framework/blob/main/playwright.config.ts) (Runner configuration), [`tests/ui`](https://github.com/sivaprkolli/playwright_framework/tree/main/tests/ui) (UI test suites), [`tests/api/api.spec.ts`](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/api/api.spec.ts) (API test suite)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_playwright["Playwright Test"]
  node_playwright_config["Runner configuration"]
  node_env_config["Environment loader<br/>[env.ts]"]
  node_auth_setup["Auth setup<br/>[auth.setup.ts]"]
end

subgraph group_ui["UI testing"]
  node_ui_tests["UI test suites"]
  node_api_tests["API test suite<br/>[api.spec.ts]"]
  node_login_page["Login page object<br/>[LoginPage.ts]"]
  node_inventory_page["Inventory page object<br/>[InventoryPage.ts]"]
  node_cart_page["Cart page object<br/>[CartPage.ts]"]
  node_checkout_page["Checkout page object<br/>[CheckoutPage.ts]"]
  node_base_page["Page interactions<br/>[BasePage.ts]"]
end

subgraph group_support["Test support"]
  node_fixtures["Test fixtures<br/>[test.fixture.ts]"]
  node_shop_helper["Shop helper<br/>[shop.helper.ts]"]
  node_checkout_data["Checkout data<br/>[checkout.data.ts]"]
end

subgraph group_results["Test results"]
  node_reporter["Test reporters"]
  node_report_output["Test reports"]
end

node_operator(("Test operator"))
node_web_app["Web application"]
node_api_service["API service"]

node_operator -->|"runs tests"| node_playwright
node_playwright_config -->|"configures runner"| node_playwright
node_playwright -->|"runs UI tests"| node_ui_tests
node_playwright -->|"runs API tests"| node_api_tests
node_playwright_config -->|"selects setup"| node_auth_setup
node_login_page -->|"extends"| node_base_page
node_inventory_page -->|"extends"| node_base_page
node_cart_page -->|"extends"| node_base_page
node_checkout_page -->|"extends"| node_base_page
node_playwright_config -->|"configures"| node_reporter
node_reporter -->|"produces reports"| node_report_output
node_ui_tests -->|"tests UI"| node_web_app
node_api_tests -->|"tests API"| node_api_service

click node_playwright_config "https://github.com/sivaprkolli/playwright_framework/blob/main/playwright.config.ts"
click node_env_config "https://github.com/sivaprkolli/playwright_framework/blob/main/src/config/env.ts"
click node_auth_setup "https://github.com/sivaprkolli/playwright_framework/blob/main/tests/auth.setup.ts"
click node_ui_tests "https://github.com/sivaprkolli/playwright_framework/tree/main/tests/ui"
click node_api_tests "https://github.com/sivaprkolli/playwright_framework/blob/main/tests/api/api.spec.ts"
click node_login_page "https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/LoginPage.ts"
click node_inventory_page "https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/InventoryPage.ts"
click node_cart_page "https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/CartPage.ts"
click node_checkout_page "https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/CheckoutPage.ts"
click node_base_page "https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/BasePage.ts"
click node_fixtures "https://github.com/sivaprkolli/playwright_framework/blob/main/tests/fixtures/test.fixture.ts"
click node_shop_helper "https://github.com/sivaprkolli/playwright_framework/blob/main/tests/helpers/shop.helper.ts"
click node_checkout_data "https://github.com/sivaprkolli/playwright_framework/blob/main/tests/test-data/checkout.data.ts"
click node_reporter "https://github.com/sivaprkolli/playwright_framework/blob/main/playwright.config.ts"

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_playwright,node_playwright_config,node_env_config,node_auth_setup toneBlue
class node_ui_tests,node_api_tests,node_login_page,node_inventory_page,node_cart_page,node_checkout_page,node_base_page toneAmber
class node_fixtures,node_shop_helper,node_checkout_data,node_api_service toneMint
class node_reporter,node_report_output toneRose
class node_operator,node_web_app toneIndigo
```

## Components

### Test execution

- **Playwright Test**
- [Runner configuration](https://github.com/sivaprkolli/playwright_framework/blob/main/playwright.config.ts): `playwright.config.ts`
- [Environment loader](https://github.com/sivaprkolli/playwright_framework/blob/main/src/config/env.ts): `src/config/env.ts`
- [Auth setup](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/auth.setup.ts): `tests/auth.setup.ts`

### UI testing

- [UI test suites](https://github.com/sivaprkolli/playwright_framework/tree/main/tests/ui): `tests/ui`
- [API test suite](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/api/api.spec.ts): `tests/api/api.spec.ts`
- [Login page object](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/LoginPage.ts): `src/pages/LoginPage.ts`
- [Inventory page object](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/InventoryPage.ts): `src/pages/InventoryPage.ts`
- [Cart page object](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/CartPage.ts): `src/pages/CartPage.ts`
- [Checkout page object](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/CheckoutPage.ts): `src/pages/CheckoutPage.ts`
- [Page interactions](https://github.com/sivaprkolli/playwright_framework/blob/main/src/pages/BasePage.ts): `src/pages/BasePage.ts`

### Test support

- [Test fixtures](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/fixtures/test.fixture.ts): `tests/fixtures/test.fixture.ts`
- [Shop helper](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/helpers/shop.helper.ts): `tests/helpers/shop.helper.ts`
- [Checkout data](https://github.com/sivaprkolli/playwright_framework/blob/main/tests/test-data/checkout.data.ts): `tests/test-data/checkout.data.ts`

### Test results

- [Test reporters](https://github.com/sivaprkolli/playwright_framework/blob/main/playwright.config.ts): `playwright.config.ts`
- **Test reports**

### Other components

- **Test operator**
- **Web application**
- **API service**

## Connections

- Test operator → Playwright Test: runs tests (evidence: `README.md`)
- Runner configuration → Playwright Test: configures runner (evidence: `playwright.config.ts`)
- Playwright Test → UI test suites: runs UI tests (evidence: `README.md`)
- Playwright Test → API test suite: runs API tests (evidence: `README.md`)
- Runner configuration → Auth setup: selects setup (evidence: `playwright.config.ts`)
- Login page object → Page interactions: extends (evidence: `src/pages/LoginPage.ts`)
- Inventory page object → Page interactions: extends (evidence: `src/pages/InventoryPage.ts`)
- Cart page object → Page interactions: extends (evidence: `src/pages/CartPage.ts`)
- Checkout page object → Page interactions: extends (evidence: `src/pages/CheckoutPage.ts`)
- Runner configuration → Test reporters: configures (evidence: `playwright.config.ts`)
- Test reporters → Test reports: produces reports (evidence: `README.md`)
- UI test suites → Web application: tests UI (evidence: `README.md`)
- API test suite → API service: tests API (evidence: `README.md`)
