# Self-Healing Tests Are Lying to You (Unless a Human Checks)

Dokimore Product Team · June 20, 2026, updated 2026-11-01 · 6 min read

Format: Opinion · Written for: QA leads and test managers, SDETs and automation engineers · Where it applies: every market

> Healing is no longer a feature you have to buy; Playwright ships a healer for free. What still matters is whether a rescue is visible, and whether anyone looks.

## In short

- Healing is now built into the engine most teams use: Playwright’s healer agent replays a failing test, inspects the current page for an equivalent element, proposes a patch to the test and reruns it until it passes or a guardrail stops it. A team on Playwright with a coding agent no longer needs to buy healing.
- What still separates tools is visibility. A rescue that is applied silently fails badly the first time it matches the wrong element while the run stays green; after that the team stops trusting green runs.
- Dokimore rescues a broken step with the other locators captured at record time, ranks live elements against the element’s recorded identity without a model call in the clear cases, and shows every rescue in the run detail. A review queue that approves a rescue before it applies is not available to customers yet.

## The maintenance spiral

A front-end refactor lands, forty tests go red, and none of them found a bug. The selectors aged out. Someone spends two days re-pointing locators, the same thing happens next sprint, and eventually a sensible person proposes deleting the suite. Automation initiatives die in maintenance.

## Healing is a commodity now

Playwright (1.64.1 at the time of writing, released 14 October 2026), the engine under many new browser suites and under Dokimore’s recorder, ships three test agents: a planner that explores the application and writes a plan, a generator that turns the plan into tests, and a healer. When a test fails, the healer replays the failing steps, inspects the current interface for an equivalent element or flow, suggests a patch such as a locator update, a wait adjustment or a data fix, and reruns the test until it passes or its guardrails stop the loop; if it believes the functionality is genuinely broken, it marks the test skipped instead. The agents run through your coding agent of choice, and Playwright’s documentation names VS Code, Claude Code, Codex and OpenCode.

So "self-healing" is not a differentiator any more, and a product page built on Playwright that leads with it is describing a free feature of its own dependency. The honest question has moved: when a tool heals, how do you find out, and what did it send where to do it?

## Rescue, rank, show

When a recorded step cannot find its element, Dokimore tries the other locators it stored for that element at record time: test ids, roles and accessible names, text, CSS and XPath variants, frames and shadow roots. Thirteen named strategy families take part. When several candidates remain, a ranker scores the live elements against the element’s recorded identity, its name, test id, label, placeholder, text and position, with heavy penalties for the wrong tag or input type; a decisive rank heals the step with no model call at all, and only an ambiguous one asks the local model to choose from a shortlist of at most five.

The rescue is never hidden. The run detail marks the step healed and shows the locator that failed, the one that matched, the strategy that found it and its confidence. Folder runs require a confidence threshold before a rescue applies. A review queue in which you approve a rescue before it applies is not available to customers; until it is, read the healed steps after each run, and record a step again when the match is wrong.

## What we measured

In September 2026 we evaluated the ranker on a fixed set of 60 locator-failure cases drawn from recordings, pinned by hash. The earlier model-only path had matched 6 of the 60. The ranker matched 48, with no false accepts, meaning it never healed a step to the wrong element, and its median decision took 38 milliseconds because the clear cases needed no model call. The 12 misses were cases where the rank was ambiguous and the local model timed out before choosing. Those are the numbers we have; they are not a maintenance-hours saving, and we do not publish one.

## Measure it for your own team

Count the hours your team spent on selector fixes last month. That number, times twelve, is the annual cost that healing attacks, and it is yours to measure, not ours to promise. Then run a suite with rescues shown for a sprint and count how many rescues a person rejected. That second number is the one a silent tool would have hidden from you.

## What to do next

1. Count the hours your team spent on selector fixes last month; times twelve is the annual cost healing attacks, and it is yours to measure.
2. Run a suite with rescues shown for one sprint and count the rescues a person rejected; that is the number a silent tool hides.
3. If your tests are Playwright, try its healer agent through your coding agent before buying anything; healing is a free feature of the engine.
4. Whatever tool heals, require four facts per rescue: the locator that failed, the replacement, the strategy and its confidence ([self-healing guide](https://dokimore.com/documentation/self-healing-and-heal-review)).
5. Record a step again when a match is wrong; a rescue nobody checked is a test that no longer checks what it was written to check.

## Questions people ask

### What is a self-healing test?

A test that, when a step can no longer find its element, tries other ways of locating it and continues if one works. Playwright’s healer agent does this by patching the test; Dokimore does it at replay time with the fallback locators captured when the flow was recorded. In both cases the important question is whether a person can see what changed.

### Does Playwright have self-healing built in?

Yes. Playwright ships planner, generator and healer agents; the healer replays a failing test, inspects the current page, proposes a patch such as a locator update and reruns until the test passes or a guardrail stops it. It runs through your coding agent, which Playwright’s docs list as VS Code, Claude Code, Codex or OpenCode.

### Why is silent healing dangerous?

Because a rescue that matches the wrong element keeps the run green while the test no longer checks what it was written to check. One such case is enough to make a team distrust every green run afterwards. Showing the original locator, the replacement and the strategy lets a person catch the wrong match.

### Can I approve a rescue before it applies in Dokimore?

Not yet. A rescue applies during the replay, folder runs require a confidence threshold first, and the run detail shows every rescue for review after the fact. A customer-facing review queue is not available; we would rather say so than imply it.

## How we measured this

- The ranker evaluation is our own: 60 locator-failure cases from recordings, pinned by content hash, the same acceptance rule for every run; 48 correct matches, 0 false accepts, median 38 ms, 12 misses from model timeouts on ambiguous ranks, measured in September 2026 on the production hardware. It measures element matching, not maintenance hours saved.
- Playwright’s healer is described from its documentation on the date beside the reference; we did not benchmark it.
- Corrected 2026-10-21: an earlier version said a person approves every heal in a review queue before it lands, cited fifteen-plus strategies and a typical 80% cut in selector maintenance. Rescues apply during the replay and are shown in the run detail; the strategies count as thirteen named families; the 80% figure was never measured. Corrected 2026-10-28: the hook said healing is a feature nobody sells (several vendors still sell it) and the text called Playwright the engine under most new suites (an unsourced share); both are reworded.

## Sources

1. [Playwright, Test agents: the planner, generator and healer; what the healer does when a test fails; the supported coding agents](https://playwright.dev/docs/test-agents) (read 2026-10-27)
2. [Playwright releases: v1.64.1, 14 October 2026](https://github.com/microsoft/playwright/releases) (read 2026-10-27)

Source: https://dokimore.com/blog/self-healing-human-in-the-loop
