New: the QA x AI radar, the glossary and 8 ready-to-copy QA prompts.See the radar →

TestingIn French: Flaky test (test instable)

Flaky test

A test that passes or fails without the code having changed.

A flaky test gives different results on the same code: green on the first run, red on the second. The most common causes are fixed waits, data shared between tests, execution order, the network or a clock.

The real cost isn’t the time lost rerunning it: it’s trust. When the team gets used to rerunning a red test, it ends up ignoring a real bug.

How to deal with it

  • Measure: track each test’s failure rate over the last 30 days.
  • Isolate: put the test in a visible quarantine, with a ticket and an owner.
  • Fix the cause: wait for a state rather than a duration, isolate the data, mock external services.

← Back to the glossary