# richmart87/playwrighttests architecture

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

- Interactive diagram: https://gitdiagram.com/richmart87/playwrighttests
- Repository: https://github.com/richmart87/playwrighttests

## Overview

PlaywrightTests is a .NET UI and REST API test suite for automationexercise.com, not the application itself. Its principal workflow is running feature tests against the site: browser tests use page objects and shared components, while API checks exercise REST behavior. The repository also supports account setup, categorized suites, configurable browser/trace behavior, and failure screenshots and traces. The README documents suite capabilities and structure; sampled source confirms browser setup, page-component construction, and artifact handling. Test-to-page call details and unsampled implementations are not shown, so those links are omitted.

Main entry points: [`Pages/HomePage.cs`](https://github.com/richmart87/playwrighttests/blob/master/Pages/HomePage.cs) (Home page), [`PlaywrightTestBase.cs`](https://github.com/richmart87/playwrighttests/blob/master/PlaywrightTestBase.cs) (Browser lifecycle), [`Tests/ApiTests.cs`](https://github.com/richmart87/playwrighttests/blob/master/Tests/ApiTests.cs) (API tests), [`Pages/CartPage.cs`](https://github.com/richmart87/playwrighttests/blob/master/Pages/CartPage.cs) (Shopping cart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_suites["Test suites"]
  node_api_tests["API tests<br/>[ApiTests.cs]"]
  node_home_tests["Home tests<br/>[HomePageTests.cs]"]
  node_product_tests["Product tests"]
  node_cart_tests["Cart tests<br/>[CartTests.cs]"]
  node_login_tests["Login tests<br/>[LoginTests.cs]"]
  node_signup_tests["Signup tests<br/>[SignUpTests.cs]"]
  node_smoke_tests["Smoke tests<br/>[SmokeTests.cs]"]
end

subgraph group_pages["Page objects"]
  node_home_page["Home page<br/>[HomePage.cs]"]
  node_products_page["Product listings<br/>[ProductsPage.cs]"]
  node_details_page["Product details"]
  node_cart_page["Shopping cart<br/>[CartPage.cs]"]
  node_login_page["Login page<br/>[LoginPage.cs]"]
  node_signup_page["Signup page<br/>[SignupPage.cs]"]
  node_account_status["Account status"]
end

subgraph group_components["Shared components"]
  node_header["Header<br/>[HeaderComponent.cs]"]
  node_product_grid["Product grid"]
  node_sidebar["Category sidebar"]
  node_cart_modal["Cart modal"]
  node_subscription["Subscription form"]
end

subgraph group_runtime["Test runtime"]
  node_test_base["Browser lifecycle"]
  node_account_api["Account API<br/>[AccountApi.cs]"]
  node_data_factory["Test data factory<br/>[TestDataFactory.cs]"]
  node_test_settings["Site endpoints<br/>[TestSettings.cs]"]
  node_run_settings["Run settings<br/>[RunSettings.cs]"]
  node_artifacts["Artifact paths<br/>[ArtifactPaths.cs]"]
  node_categories["Suite categories<br/>[TestCategories.cs]"]
end

node_runner(("Test runner"))

node_runner -->|"runs API checks"| node_api_tests
node_runner -->|"runs UI checks"| node_home_tests
node_runner -->|"runs UI checks"| node_product_tests
node_runner -->|"runs UI checks"| node_cart_tests
node_runner -->|"runs UI checks"| node_login_tests
node_runner -->|"runs UI checks"| node_signup_tests
node_runner -->|"runs smoke checks"| node_smoke_tests
node_home_page -->|"constructs"| node_header
node_home_page -->|"constructs"| node_product_grid
node_home_page -->|"constructs"| node_sidebar
node_home_page -->|"constructs"| node_cart_modal
node_home_page -->|"constructs"| node_subscription
node_details_page -->|"constructs"| node_cart_modal
node_cart_page -->|"constructs"| node_header
node_cart_page -->|"constructs"| node_subscription
node_test_base -->|"reads settings"| node_run_settings
node_test_base -->|"writes artifacts"| node_artifacts
node_api_tests -.->|"uses account setup"| node_account_api
node_account_api -.->|"creates test users"| node_data_factory
node_api_tests -.->|"targets API"| node_test_settings
node_test_base -.->|"targets site"| node_test_settings

click node_api_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/ApiTests.cs"
click node_home_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/HomePageTests.cs"
click node_product_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/ProductsPageTests.cs"
click node_cart_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/CartTests.cs"
click node_login_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/LoginTests.cs"
click node_signup_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/SignUpTests.cs"
click node_smoke_tests "https://github.com/richmart87/playwrighttests/blob/master/Tests/SmokeTests.cs"
click node_test_base "https://github.com/richmart87/playwrighttests/blob/master/PlaywrightTestBase.cs"
click node_home_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/HomePage.cs"
click node_products_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/ProductsPage.cs"
click node_details_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/ProductDetailsPage.cs"
click node_cart_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/CartPage.cs"
click node_login_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/LoginPage.cs"
click node_signup_page "https://github.com/richmart87/playwrighttests/blob/master/Pages/SignupPage.cs"
click node_account_status "https://github.com/richmart87/playwrighttests/blob/master/Pages/AccountStatusPage.cs"
click node_header "https://github.com/richmart87/playwrighttests/blob/master/Components/HeaderComponent.cs"
click node_product_grid "https://github.com/richmart87/playwrighttests/blob/master/Components/ProductGridComponent.cs"
click node_sidebar "https://github.com/richmart87/playwrighttests/blob/master/Components/SidebarComponent.cs"
click node_cart_modal "https://github.com/richmart87/playwrighttests/blob/master/Components/CartModalComponent.cs"
click node_subscription "https://github.com/richmart87/playwrighttests/blob/master/Components/SubscriptionComponent.cs"
click node_account_api "https://github.com/richmart87/playwrighttests/blob/master/TestData/AccountApi.cs"
click node_data_factory "https://github.com/richmart87/playwrighttests/blob/master/TestData/TestDataFactory.cs"
click node_test_settings "https://github.com/richmart87/playwrighttests/blob/master/Config/TestSettings.cs"
click node_run_settings "https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/RunSettings.cs"
click node_artifacts "https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/ArtifactPaths.cs"
click node_categories "https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/TestCategories.cs"

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_api_tests,node_home_tests,node_product_tests,node_cart_tests,node_login_tests,node_signup_tests,node_smoke_tests toneBlue
class node_home_page,node_products_page,node_details_page,node_cart_page,node_login_page,node_signup_page,node_account_status toneAmber
class node_header,node_product_grid,node_sidebar,node_cart_modal,node_subscription toneMint
class node_test_base,node_account_api,node_data_factory,node_test_settings,node_run_settings,node_artifacts,node_categories toneRose
class node_runner toneIndigo
```

## Components

### Test suites

- [API tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/ApiTests.cs): `Tests/ApiTests.cs`
- [Home tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/HomePageTests.cs): `Tests/HomePageTests.cs`
- [Product tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/ProductsPageTests.cs): `Tests/ProductsPageTests.cs`
- [Cart tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/CartTests.cs): `Tests/CartTests.cs`
- [Login tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/LoginTests.cs): `Tests/LoginTests.cs`
- [Signup tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/SignUpTests.cs): `Tests/SignUpTests.cs`
- [Smoke tests](https://github.com/richmart87/playwrighttests/blob/master/Tests/SmokeTests.cs): `Tests/SmokeTests.cs`

### Page objects

- [Home page](https://github.com/richmart87/playwrighttests/blob/master/Pages/HomePage.cs): `Pages/HomePage.cs`
- [Product listings](https://github.com/richmart87/playwrighttests/blob/master/Pages/ProductsPage.cs): `Pages/ProductsPage.cs`
- [Product details](https://github.com/richmart87/playwrighttests/blob/master/Pages/ProductDetailsPage.cs): `Pages/ProductDetailsPage.cs`
- [Shopping cart](https://github.com/richmart87/playwrighttests/blob/master/Pages/CartPage.cs): `Pages/CartPage.cs`
- [Login page](https://github.com/richmart87/playwrighttests/blob/master/Pages/LoginPage.cs): `Pages/LoginPage.cs`
- [Signup page](https://github.com/richmart87/playwrighttests/blob/master/Pages/SignupPage.cs): `Pages/SignupPage.cs`
- [Account status](https://github.com/richmart87/playwrighttests/blob/master/Pages/AccountStatusPage.cs): `Pages/AccountStatusPage.cs`

### Shared components

- [Header](https://github.com/richmart87/playwrighttests/blob/master/Components/HeaderComponent.cs): `Components/HeaderComponent.cs`
- [Product grid](https://github.com/richmart87/playwrighttests/blob/master/Components/ProductGridComponent.cs): `Components/ProductGridComponent.cs`
- [Category sidebar](https://github.com/richmart87/playwrighttests/blob/master/Components/SidebarComponent.cs): `Components/SidebarComponent.cs`
- [Cart modal](https://github.com/richmart87/playwrighttests/blob/master/Components/CartModalComponent.cs): `Components/CartModalComponent.cs`
- [Subscription form](https://github.com/richmart87/playwrighttests/blob/master/Components/SubscriptionComponent.cs): `Components/SubscriptionComponent.cs`

### Test runtime

- [Browser lifecycle](https://github.com/richmart87/playwrighttests/blob/master/PlaywrightTestBase.cs): `PlaywrightTestBase.cs`
- [Account API](https://github.com/richmart87/playwrighttests/blob/master/TestData/AccountApi.cs): `TestData/AccountApi.cs`
- [Test data factory](https://github.com/richmart87/playwrighttests/blob/master/TestData/TestDataFactory.cs): `TestData/TestDataFactory.cs`
- [Site endpoints](https://github.com/richmart87/playwrighttests/blob/master/Config/TestSettings.cs): `Config/TestSettings.cs`
- [Run settings](https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/RunSettings.cs): `Infrastructure/RunSettings.cs`
- [Artifact paths](https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/ArtifactPaths.cs): `Infrastructure/ArtifactPaths.cs`
- [Suite categories](https://github.com/richmart87/playwrighttests/blob/master/Infrastructure/TestCategories.cs): `Infrastructure/TestCategories.cs`

### Other components

- **Test runner**

## Connections

- Test runner → API tests: runs API checks (evidence: `README.md`)
- Test runner → Home tests: runs UI checks (evidence: `README.md`)
- Test runner → Product tests: runs UI checks (evidence: `README.md`)
- Test runner → Cart tests: runs UI checks (evidence: `README.md`)
- Test runner → Login tests: runs UI checks (evidence: `README.md`)
- Test runner → Signup tests: runs UI checks (evidence: `README.md`)
- Test runner → Smoke tests: runs smoke checks (evidence: `README.md`)
- Home page → Header: constructs (evidence: `Pages/HomePage.cs`)
- Home page → Product grid: constructs (evidence: `Pages/HomePage.cs`)
- Home page → Category sidebar: constructs (evidence: `Pages/HomePage.cs`)
- Home page → Cart modal: constructs (evidence: `Pages/HomePage.cs`)
- Home page → Subscription form: constructs (evidence: `Pages/HomePage.cs`)
- Product details → Cart modal: constructs (evidence: `Pages/ProductDetailsPage.cs`)
- Shopping cart → Header: constructs (evidence: `Pages/CartPage.cs`)
- Shopping cart → Subscription form: constructs (evidence: `Pages/CartPage.cs`)
- Browser lifecycle → Run settings: reads settings (evidence: `PlaywrightTestBase.cs`)
- Browser lifecycle → Artifact paths: writes artifacts (evidence: `PlaywrightTestBase.cs`)
- API tests → Account API: uses account setup (evidence: `README.md`)
- Account API → Test data factory: creates test users
- API tests → Site endpoints: targets API (evidence: `README.md`)
- Browser lifecycle → Site endpoints: targets site (evidence: `README.md`)
