Self-healing E2E tests with Claude MCP
Most "self-healing" tools rerun the AI agent on every test execution — that's slow, expensive, and probabilistic. There's a better split: use Claude to design the suite once, replay deterministically from snapshots, and bring the LLM back only when a selector actually breaks.
What "self-healing" actually means
The term gets stretched. In practice there are three flavours:
- Agent-driven replay — the LLM drives the browser visually on every run. Brilliant at reasoning, but pays an LLM token tax on every step. Examples: Claude Computer Use, raw
playwright-mcp. - Static selector fallbacks — the framework tries multiple selectors per element. Cheap, but breaks the moment all fallbacks miss.
- Conditional self-heal — replay is deterministic; the LLM is invoked only when a selector misses. This is what E2Easy + Claude MCP does.
Conditional self-heal gives you the maintenance benefit without the per-replay LLM bill.
The architecture
Three components, each with a clear job:
- Claude — designs the test once from a chat prompt, using
inspect_pageagainst the live DOM. - E2Easy MCP server — stores the recording as a Playwright-grade test with stable selectors, ARIA, xpath and locators.
- Playwright runner — replays the recording deterministically. On selector miss, it pings the MCP server to trigger Claude self-heal on that step only.
Cost model
For a typical 100-step E2E test replayed 100× in a year:
Authoring (Claude, once) ~$0.04
Self-heal (Claude, ~5 events/yr) ~$0.05
Replays (Playwright, 100×) $0 in LLM tokens
----
Total LLM cost / year ~$0.09
Compared to agent-driven approach:
100 replays × $3.20 per replay ~$320
That's the 100× factor you see in the headline number on the main page.
What Claude won't fix
Self-heal handles selector drift. It does not handle:
- Backend schema changes that alter the response shape — that's a real bug, the test should fail.
- Multi-step business-logic changes (e.g. checkout flow now requires 2FA).
- Feature-flag-gated UI variants — solve via test parameters, not heal.
This is intentional. Self-heal is a maintenance tool, not a way to mask product bugs.
Set up self-healing in 5 minutes
Free during early access · OAuth 2.1 + PKCE · Cancel anytime