Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

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.

  • 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.