Flaky test
Definition
A test that sometimes passes and sometimes fails on the same code, usually because of timing, shared state, test order or external services.
In more detail
Flaky tests destroy trust in a suite: people start re-running failures until they pass and ignore real bugs. Common causes in UI tests are fixed sleeps instead of waiting for a condition, selectors that match the wrong element and tests that depend on data left by other tests.
AI tools now help find and fix flakiness by reading failure traces and suggesting stable locators or waits, but they can also hide it, for example with 'self-healing' that silently changes what a test checks. Quarantine known flaky tests, fix the cause, and review AI fixes as you would a person's. LLM evals have the same problem in another form, because model output varies between runs.
Related terms
Regression eval
An eval run automatically on every prompt, model or code change, so that a drop in quality is caught before it reaches users.
Self-healing tests
Automated tests whose broken locators or steps are repaired automatically when the application under test changes, so fewer runs fail.
Read more about Flaky test
- Test automation
Automating functional, API and end-to-end checks so every change gets tested.
- Playwright
End-to-end testing framework for web apps, with built-in test agents.
- AI for QA engineers: where it helps and where it doesn't
Where it helps in test design, agent-written tests and self-healing, where it does not, and the testing skills worth building.