Healing and hints
The healer
Section titled “The healer”Apps change. A button moves, a field gets renamed, a new modal appears. When that happens, a test script that used to pass starts failing — even though nothing is actually broken for users.
The healer is the agent that handles this. When a test fails, the healer:
- Reads the Playwright trace to see what the script expected versus what was on screen.
- Works out what changed.
- Patches the script and runs it again.
If the heal works, the test passes and you may never need to look. If it doesn’t, the run shows the failure with the healer’s attempt log — what it tried and why it gave up. That’s your signal that a human is needed.
Healing is per-run. It fixes this run’s script. It doesn’t stop the same drift from happening again next time.
A hint is persistent guidance. You attach it to a variant or an application, and it sticks.
Where a heal repairs one run, a hint teaches every future run. Hints are short and specific:
- “The login button is inside a shadow DOM.”
- “Wait for the loading spinner to disappear before asserting.”
- “The search box debounces — give it a moment after typing.”
The generator reads a variant’s hints when it writes scripts. A good hint stops the breakage from happening in the first place.
Heal once, or hint forever
Section titled “Heal once, or hint forever”Both fix problems — they just last for different amounts of time:
- A heal is a one-time repair. Use it for a genuine one-off — a flaky moment, a change that won’t recur.
- A hint is permanent. Use it when the cause will keep coming back.
Rule of thumb: if you’ve seen the same kind of failure twice, stop healing it and write a hint. Healing is the safety net; hints are how you stop falling.
Related
Section titled “Related”- Concept → Tests, Test runs and reports
- Workflow → Fix a failing test