# Self-Healing Tests: How They Work

## Definition

A self-healing test can recover a target after a UI change while preserving the original interaction and expected outcome. The category describes target maintenance, not permission to change the requirement.

## Why it matters

A moved control can break a stored target without changing behavior. A plausible replacement can also be wrong. The useful question is whether the intended target, action and outcome remain demonstrably the same.

## How teams handle it today

Teams use meaningful target descriptions, stable labels and explicit assertions. When evaluating healing, they inspect a harmless layout change separately from a changed requirement or real regression.

## How Zerocheck approaches it

When a target moves, Zerocheck finds it again from the step description and records the old target, the new target and the reason. The heal is kept only when the whole test passes and the run shows that the action and outcome held up. Otherwise it stays pending, and a failed test rejects it.

## A moved control and a changed requirement are different

A layout refactor can leave the target’s identity and user outcome unchanged. A renamed control or new flow may change that identity. In Zerocheck, the replacement has to be the same control, and the whole test has to pass. There is no separate confirmation run.

## What to review in healing history

Look at the step, the old target, the new target and the reason alongside the screenshots. Pending means the run didn't show enough to keep the repair yet. A failed test rejects the repair, and the failed outcome stays a failure.

Related terms: [E2E Testing](https://tryzerocheck.com/glossary/e2e-testing/), [Selector Brittleness](https://tryzerocheck.com/glossary/selector-brittleness/), [Test Maintenance](https://tryzerocheck.com/glossary/test-maintenance/), [Agentic Testing](https://tryzerocheck.com/glossary/agentic-testing/)


---
Canonical: https://tryzerocheck.com/glossary/self-healing-test/
Updated: 2026-11-01
