# ashishrawat123/playwright-jenkins architecture

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

- Interactive diagram: https://gitdiagram.com/ashishrawat123/playwright-jenkins
- Repository: https://github.com/ashishrawat123/playwright-jenkins

## Overview

This repository is a Playwright UI/API test automation project, with an additional documented workflow for turning Jira requirements into tests and analyzing failed runs with Gemini. The main execution path is Playwright configuration into UI or API test suites; page objects and API helpers support those tests. The README documents the agent handoff, while the sampled script shows failure analysis. Several test files and agent instructions were not sampled, so their internal calls are not inferred.

Main entry points: [`playwright.config.ts`](https://github.com/ashishrawat123/playwright-jenkins/blob/main/playwright.config.ts) (Playwright runner), [`scripts/ai-analyze.js`](https://github.com/ashishrawat123/playwright-jenkins/blob/main/scripts/ai-analyze.js) (Failure analyzer), [`test-requirement-planner.agent.md`](https://github.com/ashishrawat123/playwright-jenkins/blob/main/test-requirement-planner.agent.md) (Test planner agent), [`Jira-requirement-reader.agent.md`](https://github.com/ashishrawat123/playwright-jenkins/blob/main/Jira-requirement-reader.agent.md) (Jira reader agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_runner["Playwright runner"]
  node_ui_tests["UI test suite"]
  node_api_tests["API test suite"]
  node_example_test["Example test<br/>[example.spec.ts]"]
  node_fixtures["Test fixtures<br/>[fixtures.ts]"]
end

subgraph group_ui["UI automation"]
  node_login_test["Login tests<br/>[login.spec.ts]"]
  node_info_test["Profile tests<br/>[myInfo.spec.ts]"]
  node_login_page["Login page<br/>[LoginPage.ts]"]
  node_info_page["Profile page<br/>[MyInfoPage.ts]"]
  node_common_helper["Load helpers<br/>[commonHelper.ts]"]
end

subgraph group_api["API automation"]
  node_api_list["List users<br/>[listUser.spec.ts]"]
  node_api_crud["User CRUD flow"]
  node_api_chaining["Chained data"]
  node_api_utils["API request helper<br/>[apiUtils.ts]"]
  node_user_model["User models<br/>[userDetails.ts]"]
end

subgraph group_assist["AI assistance"]
  node_jira_agent["Jira reader agent"]
  node_planner_agent["Test planner agent"]
  node_analyzer["Failure analyzer<br/>[ai-analyze.js]"]
end

node_jira{{"Jira MCP"}}
node_copilot(("Copilot approval"))
node_playwright_mcp{{"Playwright MCP"}}
node_results["Playwright results"]
node_gemini{{"Gemini API"}}
node_analysis["AI analysis output"]

node_runner -->|"discovers tests"| node_ui_tests
node_runner -->|"discovers tests"| node_api_tests
node_runner -->|"writes reports"| node_results
node_info_page -->|"uses waits"| node_common_helper
node_api_utils -.-> node_gemini
node_jira_agent -->|"reads tickets"| node_jira
node_jira_agent -->|"passes output"| node_planner_agent
node_planner_agent -->|"requests approval"| node_copilot
node_planner_agent -->|"creates tests"| node_playwright_mcp
node_analyzer -->|"reads failures"| node_results
node_analyzer -->|"sends analysis"| node_gemini
node_analyzer -->|"writes report"| node_analysis

click node_runner "https://github.com/ashishrawat123/playwright-jenkins/blob/main/playwright.config.ts"
click node_ui_tests "https://github.com/ashishrawat123/playwright-jenkins/tree/main/tests"
click node_api_tests "https://github.com/ashishrawat123/playwright-jenkins/tree/main/api"
click node_example_test "https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/example.spec.ts"
click node_login_test "https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/login.spec.ts"
click node_info_test "https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/myInfo.spec.ts"
click node_login_page "https://github.com/ashishrawat123/playwright-jenkins/blob/main/pages/LoginPage.ts"
click node_info_page "https://github.com/ashishrawat123/playwright-jenkins/blob/main/pages/MyInfoPage.ts"
click node_common_helper "https://github.com/ashishrawat123/playwright-jenkins/blob/main/helpers/commonHelper.ts"
click node_api_list "https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/listUser.spec.ts"
click node_api_crud "https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/goRestCURDFlow.spec.ts"
click node_api_chaining "https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/chaningData.spec.ts"
click node_api_utils "https://github.com/ashishrawat123/playwright-jenkins/blob/main/helpers/apiUtils.ts"
click node_user_model "https://github.com/ashishrawat123/playwright-jenkins/blob/main/models/userDetails.ts"
click node_fixtures "https://github.com/ashishrawat123/playwright-jenkins/blob/main/Fixtures/fixtures.ts"
click node_jira_agent "https://github.com/ashishrawat123/playwright-jenkins/blob/main/Jira-requirement-reader.agent.md"
click node_planner_agent "https://github.com/ashishrawat123/playwright-jenkins/blob/main/test-requirement-planner.agent.md"
click node_analyzer "https://github.com/ashishrawat123/playwright-jenkins/blob/main/scripts/ai-analyze.js"

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_runner,node_ui_tests,node_api_tests,node_example_test,node_fixtures toneBlue
class node_login_test,node_info_test,node_login_page,node_info_page,node_common_helper toneAmber
class node_api_list,node_api_crud,node_api_chaining,node_api_utils,node_user_model,node_gemini toneMint
class node_jira_agent,node_planner_agent,node_analyzer toneRose
class node_jira,node_copilot,node_playwright_mcp,node_results,node_analysis toneIndigo
```

## Components

### Test execution

- [Playwright runner](https://github.com/ashishrawat123/playwright-jenkins/blob/main/playwright.config.ts): `playwright.config.ts`
- [UI test suite](https://github.com/ashishrawat123/playwright-jenkins/tree/main/tests): `tests`
- [API test suite](https://github.com/ashishrawat123/playwright-jenkins/tree/main/api): `api`
- [Example test](https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/example.spec.ts): `tests/example.spec.ts`
- [Test fixtures](https://github.com/ashishrawat123/playwright-jenkins/blob/main/Fixtures/fixtures.ts): `Fixtures/fixtures.ts`

### UI automation

- [Login tests](https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/login.spec.ts): `tests/login.spec.ts`
- [Profile tests](https://github.com/ashishrawat123/playwright-jenkins/blob/main/tests/myInfo.spec.ts): `tests/myInfo.spec.ts`
- [Login page](https://github.com/ashishrawat123/playwright-jenkins/blob/main/pages/LoginPage.ts): `pages/LoginPage.ts`
- [Profile page](https://github.com/ashishrawat123/playwright-jenkins/blob/main/pages/MyInfoPage.ts): `pages/MyInfoPage.ts`
- [Load helpers](https://github.com/ashishrawat123/playwright-jenkins/blob/main/helpers/commonHelper.ts): `helpers/commonHelper.ts`

### API automation

- [List users](https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/listUser.spec.ts): `api/listUser.spec.ts`
- [User CRUD flow](https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/goRestCURDFlow.spec.ts): `api/goRestCURDFlow.spec.ts`
- [Chained data](https://github.com/ashishrawat123/playwright-jenkins/blob/main/api/chaningData.spec.ts): `api/chaningData.spec.ts`
- [API request helper](https://github.com/ashishrawat123/playwright-jenkins/blob/main/helpers/apiUtils.ts): `helpers/apiUtils.ts`
- [User models](https://github.com/ashishrawat123/playwright-jenkins/blob/main/models/userDetails.ts): `models/userDetails.ts`

### AI assistance

- [Jira reader agent](https://github.com/ashishrawat123/playwright-jenkins/blob/main/Jira-requirement-reader.agent.md): `Jira-requirement-reader.agent.md`
- [Test planner agent](https://github.com/ashishrawat123/playwright-jenkins/blob/main/test-requirement-planner.agent.md): `test-requirement-planner.agent.md`
- [Failure analyzer](https://github.com/ashishrawat123/playwright-jenkins/blob/main/scripts/ai-analyze.js): `scripts/ai-analyze.js`

### Other components

- **Jira MCP**
- **Copilot approval**
- **Playwright MCP**
- **Playwright results**
- **Gemini API**
- **AI analysis output**

## Connections

- Playwright runner → UI test suite: discovers tests (evidence: `playwright.config.ts`)
- Playwright runner → API test suite: discovers tests (evidence: `playwright.config.ts`)
- Playwright runner → Playwright results: writes reports (evidence: `playwright.config.ts`)
- Profile page → Load helpers: uses waits (evidence: `pages/MyInfoPage.ts`)
- API request helper → Gemini API
- Jira reader agent → Jira MCP: reads tickets (evidence: `Readme.md`)
- Jira reader agent → Test planner agent: passes output (evidence: `Readme.md`)
- Test planner agent → Copilot approval: requests approval (evidence: `Readme.md`)
- Test planner agent → Playwright MCP: creates tests (evidence: `Readme.md`)
- Failure analyzer → Playwright results: reads failures (evidence: `scripts/ai-analyze.js`)
- Failure analyzer → Gemini API: sends analysis (evidence: `scripts/ai-analyze.js`)
- Failure analyzer → AI analysis output: writes report (evidence: `scripts/ai-analyze.js`)
