# mahoozi97/playwright-pytest-project architecture

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

- Interactive diagram: https://gitdiagram.com/mahoozi97/playwright-pytest-project
- Repository: https://github.com/mahoozi97/playwright-pytest-project

## Overview

This repository is a small pytest/Playwright browser-automation example suite, not the Playwright library itself. Its apparent workflow is running scenarios that exercise OrangeHRM pages or API/data-driven examples, with pytest configuration preparing HTML reports. Test files and data files were not excerpted, so links from scenarios to page objects, data, and external services are unverified; those edges are dashed rather than asserted as observed calls.

Main entry points: [`tests/test_login_orangehrm.py`](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_login_orangehrm.py) (Login scenario), [`tests/test_data_driven_demo.py`](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_data_driven_demo.py) (Data-driven demo), [`tests/api/test_api_get.py`](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_get.py) (API GET scenario), [`tests/api/test_api_post.py`](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_post.py) (API POST scenario)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenarios["Test scenarios"]
  node_login_test["Login scenario"]
  node_api_get["API GET scenario<br/>[test_api_get.py]"]
  node_api_post["API POST scenario<br/>[test_api_post.py]"]
  node_data_test["Data-driven demo"]
  node_rec_test["Recorded scenario<br/>[test_rec_1.py]"]
end

subgraph group_ui["OrangeHRM pages"]
  node_login_page["Login page object"]
  node_home_page["Home page object"]
end

subgraph group_support["Inputs and reporting"]
  node_csv_data["CSV data<br/>[data.csv]"]
  node_json_data["JSON data<br/>[data.json]"]
  node_report_config["HTML report setup<br/>[conftest.py]"]
end

node_runner(("Pytest runner"))
node_orangehrm(("OrangeHRM demo"))
node_api_service(("API service"))

node_runner -.->|"runs"| node_login_test
node_runner -.->|"runs"| node_api_get
node_runner -.->|"runs"| node_api_post
node_runner -.->|"runs"| node_data_test
node_runner -.->|"runs"| node_rec_test
node_login_test -.->|"may use"| node_login_page
node_login_test -.->|"may automate"| node_orangehrm
node_login_page -->|"navigates to"| node_orangehrm
node_home_page -.->|"acts on"| node_orangehrm
node_data_test -.->|"may read"| node_csv_data
node_data_test -.->|"may read"| node_json_data
node_api_get -.->|"may request"| node_api_service
node_api_post -.->|"may request"| node_api_service
node_runner -->|"configures report"| node_report_config

click node_login_test "https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_login_orangehrm.py"
click node_api_get "https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_get.py"
click node_api_post "https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_post.py"
click node_data_test "https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_data_driven_demo.py"
click node_rec_test "https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_rec_1.py"
click node_login_page "https://github.com/mahoozi97/playwright-pytest-project/blob/main/pages/orangehrm_login_page.py"
click node_home_page "https://github.com/mahoozi97/playwright-pytest-project/blob/main/pages/orangehrm_home_page.py"
click node_csv_data "https://github.com/mahoozi97/playwright-pytest-project/blob/main/test_data/data.csv"
click node_json_data "https://github.com/mahoozi97/playwright-pytest-project/blob/main/test_data/data.json"
click node_report_config "https://github.com/mahoozi97/playwright-pytest-project/blob/main/conftest.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_test,node_api_get,node_api_post,node_data_test,node_rec_test toneBlue
class node_login_page,node_home_page toneAmber
class node_csv_data,node_json_data,node_report_config,node_api_service toneMint
class node_runner,node_orangehrm toneIndigo
```

## Components

### Test scenarios

- [Login scenario](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_login_orangehrm.py): `tests/test_login_orangehrm.py`
- [API GET scenario](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_get.py): `tests/api/test_api_get.py`
- [API POST scenario](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/api/test_api_post.py): `tests/api/test_api_post.py`
- [Data-driven demo](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_data_driven_demo.py): `tests/test_data_driven_demo.py`
- [Recorded scenario](https://github.com/mahoozi97/playwright-pytest-project/blob/main/tests/test_rec_1.py): `tests/test_rec_1.py`

### OrangeHRM pages

- [Login page object](https://github.com/mahoozi97/playwright-pytest-project/blob/main/pages/orangehrm_login_page.py): `pages/orangehrm_login_page.py`
- [Home page object](https://github.com/mahoozi97/playwright-pytest-project/blob/main/pages/orangehrm_home_page.py): `pages/orangehrm_home_page.py`

### Inputs and reporting

- [CSV data](https://github.com/mahoozi97/playwright-pytest-project/blob/main/test_data/data.csv): `test_data/data.csv`
- [JSON data](https://github.com/mahoozi97/playwright-pytest-project/blob/main/test_data/data.json): `test_data/data.json`
- [HTML report setup](https://github.com/mahoozi97/playwright-pytest-project/blob/main/conftest.py): `conftest.py`

### Other components

- **Pytest runner**
- **OrangeHRM demo**
- **API service**

## Connections

- Pytest runner → Login scenario: runs (evidence: `README.md`)
- Pytest runner → API GET scenario: runs (evidence: `README.md`)
- Pytest runner → API POST scenario: runs (evidence: `README.md`)
- Pytest runner → Data-driven demo: runs (evidence: `README.md`)
- Pytest runner → Recorded scenario: runs (evidence: `README.md`)
- Login scenario → Login page object: may use
- Login scenario → OrangeHRM demo: may automate
- Login page object → OrangeHRM demo: navigates to (evidence: `pages/orangehrm_login_page.py`)
- Home page object → OrangeHRM demo: acts on
- Data-driven demo → CSV data: may read
- Data-driven demo → JSON data: may read
- API GET scenario → API service: may request
- API POST scenario → API service: may request
- Pytest runner → HTML report setup: configures report (evidence: `conftest.py`)
