AI-assisted test automation for enterprise teams that need speed without losing control of test intent, review, and accountability.
AI can generate tests quickly.
That is useful, but it is not enough.
In enterprise systems, the hard problem is not generating Playwright code. The hard problem is making sure generated tests continue to prove the right business behavior after requirements, planning, implementation, CI execution, and failure recovery.
This repository turns that idea into a practical reference workflow for Playwright, BDD, CI, and AI-assisted test generation.
This project documents a governed approach:
AI generates. Humans decide. No exceptions.
This repository is a public reference model for an AI-assisted, human-governed testing workflow.
It includes:
- A long-form architecture article
- A sample approved brief
- A sample structured test plan
- A sample BDD feature file
- A sample Playwright configuration
- A sample CI workflow template
- A reusable checklist for reviewing AI-generated tests
- Guidance for rejected assumptions, data sensitivity, healer handoff, and success criteria
The examples are intentionally generic and product-neutral. They are designed to show the workflow, not expose any private application logic.
Requirements / Story
|
v
Brief
|
v
Human Review Gate
|
v
Approved Brief
|
v
Planner Agent
|
v
Generator Agent
|
v
Human PR Review
|
v
CI Execution
|
v
Failure Recovery
|
v
Human Handoff
The approved brief locks test intent.
Downstream agents should read the approved brief, not reinterpret the original work item or explore the UI to infer business meaning.
AI can help plan scenarios, generate BDD, write Playwright code, and repair technical drift.
It should not decide what the product is supposed to do.
Self-healing tests are useful only when they repair execution problems.
They become dangerous when they weaken assertions, remove coverage, or convert real product defects into passing tests.
Generator self-correction and healer recovery are intentionally separate.
The generator fixes authoring-time implementation issues before review.
The healer is a conditional CI-failure recovery mechanism.
Humans review the brief.
Humans review the PR.
Humans decide whether a failing test represents a test issue, environment issue, requirement mismatch, or genuine product defect.
When a healer agent succeeds, it should leave reviewed changes in the working branch.
It should not silently commit, push, or open a pull request.
AI-assisted workflows need explicit limits for fix attempts, flaky retries, data sensitivity, and review cost.
Without limits, automation can spend too much time trying to repair failures whose root cause is unclear.
The pipeline is intentionally tool-neutral, but it maps well to real enterprise test infrastructure.
Example implementation choices:
- Work item system: Azure DevOps, Jira, Linear, GitHub Issues
- Test framework: Playwright, Playwright BDD, Cucumber-style BDD
- CI runner: GitHub Actions, Azure DevOps, GitLab CI, Jenkins
- Container execution: Docker, Kubernetes, AKS, EKS, GKE
- Cross-browser validation: BrowserStack, Sauce Labs, Playwright browser projects
- Secret management: GitHub Actions secrets, Azure Key Vault, AWS Secrets Manager, HashiCorp Vault
- Reporting: Playwright HTML report, Allure, ReportPortal, CI artifacts
- Observability: CI logs, traces, screenshots, videos, browser console logs, network logs
The core workflow should remain the same regardless of tool choice:
Human-approved intent -> AI-assisted implementation -> CI feedback -> bounded recovery -> human handoff
- Architecture Article
- Sample Brief
- Sample Test Plan
- Sample Feature File
- AI Test Review Checklist
- Sample GitHub Actions Workflow
The sample artifacts model a generic dashboard access workflow:
- Viewer can open an existing dashboard
- Editor can create a dashboard
- Admin can manage dashboard permissions
- Unauthorized users do not see privileged actions
The point is not the dashboard itself.
The point is the governance workflow around requirement interpretation, test generation, review, and recovery.
This reference is intended for:
- QA architects
- Test automation engineers
- Engineering managers
- Platform teams
- Teams migrating from Selenium to Playwright
- Teams experimenting with AI-assisted test generation
- Teams that need automation governance, not just test generation speed
This is not:
- A claim that AI should fully own testing
- A demo where an agent freely explores the UI and invents coverage
- A replacement for product and QA review
- A generic starter framework for every test project
It is a reference workflow for building AI-assisted automation with explicit human control points.
This is an evolving reference model.
The first version focuses on the architecture and governance workflow. Future versions may include a fuller Playwright BDD skeleton, prompt templates, and CI examples.