# 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 resolves it again from the step description and records the old target, new target, reason and validation state. A heal is saved only when the full unchanged test passes with independent evidence. Insufficient evidence leaves it pending; a failed test rejects its candidates.

## 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 must preserve the intended target and the full unchanged test must pass with independent evidence. There is no automatic full-test confirmation rerun.

## What to review in healing history

Inspect the step, previous target, replacement target, reason and validation state alongside the screenshots. Pending means the required evidence is not sufficient to persist the repair as verified. A failed test rejects its healing candidates rather than turning the failed outcome into a pass.

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-09-14
