Skip to main content
GlossaryAI in TestingAI-Based Flaky Test Detection
AI in Testing Modern Term

AI-Based Flaky Test Detection

AI-based flaky test detection analyzes historical test run data to identify tests that fail intermittently for reasons unrelated to the code under test — timing races, network hiccups, animation delays — and flags or quarantines them automatically, instead of a human noticing the same test "randomly" failing over weeks.

Flaky tests are expensive in a way that's easy to underestimate: every intermittent failure either gets re-run, wasting CI time, or ignored, eroding trust in the whole suite until people start ignoring real failures too. Manually tracking which tests are flaky requires someone to notice a pattern across dozens of unrelated CI runs, which rarely happens systematically.

Detection models typically look at a test's pass/fail history against the same code — a genuinely broken test fails consistently; a flaky one fails inconsistently against unchanged code — and can also correlate failures with infrastructure signals, like CI runner load or network latency spikes, to suggest a root cause category, not just a flakiness score.

Detection is only half the fix — the other half is what a team does with a flagged test: quarantine it out of the required-to-pass gate while someone investigates, rather than either blocking every PR on a test that isn't the PR's fault, or silently deleting the coverage it provided.