Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
AI-assisted Playwright MCP framework for test planning, generation, healing, GitHub traceability, CI/CD, and hallucination detection.
Fetched from the repository for this visit.
An AI-assisted quality engineering framework built using Playwright, TypeScript, Playwright MCP, and GitHub-based traceability.
The framework demonstrates a controlled multi-agent workflow for test planning, automation generation, hallucination detection, failure diagnosis, human approval, reporting, and GitHub Actions CI/CD.
playwright-agentic-quality-engineering-framework/
│
├── .github/
│ ├── agents/
│ │ ├── playwright-test-planner.agent.md
│ │ ├── playwright-test-generator.agent.md
│ │ └── playwright-test-healer.agent.md
│ │
│ ├── ISSUE_TEMPLATE/
│ │
│ └── workflows/
│ └── playwright.yml
│
├── .vscode/
│ └── mcp.json
│
├── docs/
│ ├── automation-standards.md
│ ├── hallucination-guardrails.md
│ └── human-approval-process.md
│
├── fixtures/
│ └── baseTest.ts
│
├── pages/
│ ├── LoginPage.ts
│ ├── ProductsPage.ts
│ ├── CartPage.ts
│ └── CheckoutPage.ts
│
├── requirements/
│ ├── GH-001-successful-checkout.md
│ └── GH-002-hallucination-challenge.md
│
├── specs/
│ ├── GH-001-checkout-plan.md
│ └── rejected/
│ └── GH-002-unsupported-scenarios.md
│
├── test-data/
│ └── testData.ts
│
├── tests/
│ ├── smoke/
│ │ └── GH-001-checkout.spec.ts
│ ├── regression/
│ └── seed.spec.ts
│
├── playwright.config.ts
├── package.json
├── package-lock.json
├── tsconfig.json
├── .gitignore
└── README.md
Generated folders such as playwright-report/ and test-results/ are excluded from Git and published through GitHub Actions as execution artifacts.
GitHub Issue / Requirement
↓
Playwright Test Planner
↓
Playwright MCP Browser Exploration
↓
Evidence-Based Test Plan
↓
Hallucination Validation
↓
Senior QA Approval
↓
Playwright Test Generator
↓
POM + Fixtures + Automated Tests
↓
GitHub Actions Quality Gate
↓
Pass → Report / Pull Request
Fail → Playwright Test Healer
↓
Human Review
The framework keeps a human QA approval gate between AI-generated test planning and automation generation.
The Planner agent:
The Generator agent:
The Healer agent:
| Requirement | Approved Scenarios | Passing | Failing |
|---|---|---|---|
| GH-001 — Successful Product Checkout | 5 | ✅ 5 | 0 |
| GH-002 — Hallucination Validation | 4 rejected suggestions | ✅ Validated | 0 |
| Total automated GH-001 scenarios | 5 | ✅ 5 | 0 |
| Scenario ID | Scenario | Status |
|---|---|---|
| GH-001-SC01 | Login with valid credentials | ✅ PASS |
| GH-001-SC02 | Add Sauce Labs Backpack to the cart | ✅ PASS |
| GH-001-SC03 | Review cart and proceed to checkout | ✅ PASS |
| GH-001-SC04 | Enter checkout information and continue | ✅ PASS |
| GH-001-SC05 | Complete the order and verify confirmation | ✅ PASS |
The framework includes a controlled hallucination-validation requirement under:
requirements/GH-002-hallucination-challenge.md
The following stakeholder suggestions were intentionally unverified:
The Test Planner compared each suggestion against:
All four suggestions were classified as:
REJECTED_UNSUPPORTED
The rejected scenarios are documented in:
specs/rejected/GH-002-unsupported-scenarios.md
No Playwright automation was generated for unsupported requirements.
Every AI-generated scenario must be classified as one of the following:
| Classification | Meaning |
|---|---|
VERIFIED | Supported by the requirement and observed application behaviour |
ASSUMPTION_REQUIRES_REVIEW | Possible scenario, but requirement evidence is incomplete |
REJECTED_UNSUPPORTED | Not supported by the requirement or current application |
Only scenarios marked VERIFIED and approved by the Senior QA are passed to the Test Generator.
git clone https://github.com/Jiten20/playwright-agentic-quality-engineering-framework.git
cd playwright-agentic-quality-engineering-framework
npm ci
npx playwright install
For Linux or CI environments:
npx playwright install --with-deps
| Command | Description |
|---|---|
npm test | Run all Playwright tests |
npm run test:smoke | Run smoke tests |
npm run test:regression | Run regression tests |
npm run test:headed | Run tests in headed mode |
npm run test:debug | Run tests using Playwright Debug Mode |
npm run typecheck | Validate TypeScript |
npm run report | Open the Playwright HTML report |
# Run all tests
npm test
# Run smoke tests
npm run test:smoke
# Run regression tests
npm run test:regression
# Run in headed mode
npm run test:headed
# Validate TypeScript
npm run typecheck
# Open the latest HTML report
npm run report
Tests are mapped to GitHub Issues and scenario IDs.
Example:
test(
'Complete the order and verify confirmation',
{
tag: ['@smoke', '@GH-1', '@GH-001-SC05'],
annotation: {
type: 'github-issue',
description: 'GH-001 — Successful Product Checkout'
}
},
async ({ loginPage, productsPage, cartPage, checkoutPage }) => {
// Test implementation
}
);
Traceability flow:
GitHub Issue
↓
Requirement File
↓
Planner Test Plan
↓
QA-Approved Scenario
↓
Generated Playwright Test
↓
GitHub Actions Result
The framework uses the Page Object Model to separate reusable application behaviour from test logic.
Test File
↓
Custom Fixture
↓
Page Object
↓
Playwright Locator and Action
↓
Browser
Benefits:
Custom fixtures inject Page Objects directly into tests.
Example:
test(
'Validate checkout',
async ({
loginPage,
productsPage,
cartPage,
checkoutPage
}) => {
// Test implementation
}
);
Benefits:
The framework uses test.step() to represent business-level actions.
await test.step('Login with valid credentials', async () => {
await loginPage.login(username, password);
});
await test.step('Complete checkout', async () => {
await checkoutPage.completeCheckout();
});
Benefits:
The framework follows Playwright locator best practices.
| Priority | Locator Type | Example |
|---|---|---|
| ✅ 1 | getByRole() | getByRole('button', { name: 'Login' }) |
| ✅ 2 | getByLabel() | getByLabel('Username') |
| ✅ 3 | getByPlaceholder() | getByPlaceholder('Username') |
| ✅ 4 | getByText() | getByText('Products') |
| ✅ 5 | getByTestId() | getByTestId('checkout') |
| ⚠️ 6 | Stable CSS selector | [data-test="checkout"] |
Avoid:
nth-child() selectorswaitForTimeout() callsSauceDemo uses the data-test attribute. The framework configures:
use: {
testIdAttribute: 'data-test'
}
This allows:
page.getByTestId('login-button');
Playwright HTML reports are generated automatically after execution.
Open the local report:
npx playwright show-report
Generated reports are excluded from Git and uploaded as GitHub Actions artifacts.
The project uses GitHub Actions as a Playwright quality gate.
Workflow:
.github/workflows/playwright.yml
The workflow executes on:
mainnpm ciEnsure the workflow includes:
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
Then:
To re-run an existing execution:
Configured in:
playwright.config.ts
| Setting | Value | Purpose |
|---|---|---|
testDir | ./tests | Test location |
fullyParallel | true | Enable parallel-safe execution |
forbidOnly | CI only | Prevent committed focused tests |
retries | 2 in CI | Retry failed CI tests |
workers | 1 in CI | Improve CI stability |
screenshot | only-on-failure | Capture failure screenshots |
trace | on-first-retry or retain-on-failure | Support diagnosis |
video | retain-on-failure | Record failed executions |
testIdAttribute | data-test | Support SauceDemo test attributes |
.gitignore# Dependencies
node_modules/
# Playwright outputs
playwright-report/
test-results/
blob-report/
# Build output
dist/
# Environment variables
.env
.env.*
# OS files
.DS_Store
Thumbs.db
| Tool | Purpose |
|---|---|
| Playwright | Browser automation and test execution |
| TypeScript | Framework implementation |
| Playwright MCP | Browser exploration for AI agents |
| GitHub MCP | Repository, Issue and PR interaction |
| GitHub Issues | Requirements and traceability |
| GitHub Projects | Agent workflow and QA approval tracking |
| GitHub Actions | Continuous integration |
| HTML Reporter | Test execution reporting |
| VS Code | MCP-enabled development environment |
The framework applies the following controls:
main.Loading reviews...
GitHub checked 190h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). Connect directly and complete any provider authentication separately; this is not platform-key access.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.