DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk6 min

Flaky Tests: How to Choose a Finder That Restores Trust

Flaky tests can pass and fail against unchanged code. Learn how to identify suspicious results, investigate likely causes, and use retries or quarantine without masking real regressions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A flaky test can pass and fail against the same code. That means a red result is not automatically proof of a code regression—and repeated false alarms can teach developers to discount tests that should be protecting the software. A tool for finding suspicious tests is useful only if it helps teams recover trustworthy signals and investigate causes, rather than simply labeling failures as noise.

What makes a test flaky?

John Micco’s 2016 account of Google’s experience defines a flaky result as one in which “the same test exhibits both a passing and a failing result with the same code.” Fuchsia’s policy uses a similar standard: a test sometimes passes and sometimes fails when run using the exact same revision. The key condition is unchanged code; a failure after a code change may instead be a genuine regression. Neither definition identifies the cause by itself.

As an Amazon Associate I earn from qualifying purchases.

Flakiness erodes the value of a test suite in two directions. A false failure wastes time and can make developers less likely to trust future failures. A flaky test can also pass when it should fail, allowing a real bug through. Fuchsia’s policy warns that flakes can let real bugs slip past its commit queue, devalue useful tests, and increase queue failures and latency.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How widespread is test flakiness?

Historical Google observations illustrate why teams take the problem seriously, but they are not current industry-wide estimates. In 2016, Micco reported that about 1.5% of all test runs produced a flaky result, almost 16% of Google’s tests had some level of flakiness, and about 84% of observed post-submit transitions from pass to fail involved a flaky test. These figures use different denominators and describe Google’s experience at that time; they should not be combined or treated as estimates for another team.

A separate Google Research summary reported that 4.56% of test failures across Google’s TAP continuous-integration executions were attributed to flaky tests during a 15-month window. That figure has a different scope from the 2016 observations and is not directly comparable. The practical lesson is not that a particular percentage of your suite must be flaky; it is that intermittent outcomes can materially undermine CI signals.

What a flaky-test finder should establish

The title of a tool does not establish how it detects flakes, how accurate it is, or what it costs to run. At minimum, a useful finding should help an engineer see why a test is considered suspicious: for example, the relevant runs and outcomes, the code revision, and whether those runs actually held the code constant. A label without enough context can turn an uncertain signal into another kind of noise.

When evaluating a detection approach, consider these questions:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Evidence: Can the team inspect the runs behind a flag and confirm that the same test and code revision produced different outcomes?
  • Confidence: Does the method distinguish observed inconsistency from a confirmed root cause? A suspicious test is not necessarily understood or fixed.
  • Cost: How much extra execution time and CI compute do retries or repeated runs consume?
  • Regression risk: Could the policy allow a real failure to pass, or delay discovery until a test fails repeatedly?
  • Workflow fit: Does the approach connect to the team’s CI process without leaving quarantined tests invisible?
  • Diagnostic value: Does it preserve useful failure details for investigating the test, runner, application, dependencies, or environment?

Where flakiness can originate

Google’s 2021 guidance groups possible causes into four areas. A test can be unreliable because of its own logic; the framework or runner that executes it; the application under test or its dependencies; or the operating system, hardware, and network. A finder can point to a pattern, but these categories are places for engineers to investigate—not checks that any particular tool is known to perform automatically.

Test setup, state, and order

Look for setup, initialization, cleanup, or test-data assumptions that leave shared state behind. A test may pass alone but fail after another test changes a shared resource, or depend on a previous run having prepared something that it does not create itself. Run the test independently and compare that result with its behavior in the suite; the difference can reveal order dependence or hidden state.

Timing and asynchronous behavior

Inspect timeouts, race conditions, and assumptions about when asynchronous work finishes. An arbitrary sleep may appear to stabilize a test, but it can still fail when the system is slower than expected and can make every run slower. Prefer explicit synchronization on the application state the test needs—for example, waiting for the expected condition—rather than waiting a fixed amount of time.

Runner and system readiness

Check whether the framework allocated enough resources and whether the system under test started successfully. A test failure caused by a runner that could not provide the expected resources is different from an application regression, even if both appear as red CI results. Preserve execution details that let the team distinguish them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dependencies and environment

Consider environmental dependencies the test does not control, including the operating system, hardware, and network, as well as services or components the application relies on. If a test assumes an external dependency is available or behaves identically on every run, that assumption can produce intermittent outcomes unrelated to the code change under review.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Retries and quarantine: useful safeguards, not repairs

Rerunning failures can reduce false alarms, but a retry is not proof that the original failure was harmless. Requiring repeated failures before reporting a problem can also delay discovery of a genuine regression. The retry policy should therefore make the initial failure and subsequent outcomes visible, rather than quietly converting an inconsistent result into a pass.

Quarantine can remove a highly flaky test from the critical path and reduce disruption while engineers investigate. Fuchsia’s policy is explicit that removing flakes from the critical path should happen quickly, but the tests must not be ignored afterward. A quarantined test that no one owns or monitors can hide a race or real bug just as effectively as a retry policy can hide an intermittent regression.

A practical investigation workflow

  1. Confirm the comparison. Check that the differing results came from the same test at the same code revision. If the code changed, assess the failure as a possible regression rather than assuming it is a flake.
  2. Collect the run context. Keep the failing and passing outcomes, execution order, runner details, and relevant environment information together. This gives the investigator evidence to compare rather than a bare “flaky” label.
  3. Isolate the test. Run it independently and compare that result with its behavior in the full suite. If isolation changes the outcome, investigate order dependence and shared state.
  4. Trace the failure across the four cause areas. Check test setup and cleanup, framework resources and startup, application and dependency behavior, and environmental conditions such as operating system, hardware, or network.
  5. Replace timing guesses with conditions. Where a test relies on a fixed delay, synchronize on the actual application state it needs. Then run it repeatedly in the relevant CI context to see whether the change addresses the inconsistency.
  6. Keep mitigation visible until repair. If retries or quarantine are needed to protect the critical path, record the test’s status and keep it under investigation. Restore it to normal gating only when the team has addressed the cause and regained confidence in its result.

What success looks like

Finding a suspicious test is the start of the work, not the outcome. A useful process connects inconsistent runs to a reproducible cause, repairs that cause where possible, and keeps any temporary mitigation visible. The goal is not merely fewer red builds: it is a test suite whose failures developers can treat as evidence again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.