Self-healing tests
Definition
Automated tests whose broken locators or steps are repaired automatically when the application under test changes, so fewer runs fail.
In more detail
Healing can hide real bugs if a test is "fixed" to match broken behaviour, so review every repair. Playwright's healer agent proposes fixes for failing tests that you then accept or reject.
Healing usually means updating a broken locator after the UI changes: the tool notices the old selector fails, finds the element by other attributes or with a model, and proposes a new one. That saves maintenance on cosmetic changes. The danger is when a test heals around a real regression, so keep healing as a proposal a person reviews, not a silent fix.
Related terms
Browser agent
An agent that navigates websites and acts on them, such as filling forms, clicking through flows or extracting information from pages.
Flaky test
A test that sometimes passes and sometimes fails on the same code, usually because of timing, shared state, test order or external services.
Read more about Self-healing tests
- AI in testing
Using AI to plan, generate and maintain tests, and testing AI features themselves.
- Playwright test agents: planner, generator and healer
How Playwright's planner, generator and healer test agents work, how to set them up with Claude Code or VS Code, and how to review the tests they write for you.
- Flaky test
A test that sometimes passes and sometimes fails on the same code, usually because of timing, shared state, test order or external services.
- Generate Playwright tests with AI agents, then review them
Approve a test plan before any code exists, generate tests from it and review them like production code.