1.1
Flake Taxonomy and Why Retries Hide Information
A flaky test produces inconsistent outcomes under conditions intended to be equivalent. A consistently failing test and a broken environment are different signals.
Classify before repair. Product races, test synchronization defects, unstable data, environment capacity, external dependencies, and requirement ambiguity can all produce intermittent outcomes. Repeating the same command reveals inconsistency; it does not identify the cause by itself.
A framework retry can make a CI job green while preserving the unstable first attempt. Keep retry metadata visible and establish a no-retry measurement lane when possible. Quarantine may protect delivery temporarily, but it must have an owner, defect, scope, and expiry or it becomes silent coverage loss.
| Observed pattern | Classification | Next evidence |
|---|---|---|
| Pass and fail across equivalent runs | Flaky signal | Trace, timings, state, infrastructure metrics |
| Fails every run for same assertion | Deterministic failure | Requirement, product, test, and data diagnosis |
| No report produced | Measurement failure | Reporter output, command exit, file discovery |
| Only retry succeeds | Hidden instability | First-attempt result and retry reason |
| Different error class each run | Environment or compound issue | Resource and dependency evidence |
A test that passes every time can assert the wrong behavior. A test that fails every time can correctly expose a product defect. Reliability and correctness need separate evidence.
Collect five recent failures and classify each as flaky signal, deterministic failure, measurement failure, or environment incident before suggesting a fix.