neart.ai
EcosystemStoryHow We BuildPricingBlog
Try Inspected →
neart.ai
EcosystemStoryHow We BuildBlog

Ní neart go cur le chéile

A SaltCore Group Limited company

© 2026 neart.ai · SaltCore Group Limited. All rights reserved.

Software Quality

How Do You Measure Flaky Test Rate? The Metrics That Actually Matter

22 November 20254 min read

To measure flakiness, track the flake rate (the share of test runs that fail and then pass on the same code), the number of distinct flaky tests, the time spent on flaky-failure investigation, and the pipeline pass rate on first attempt. The single most useful number is flake rate, because it captures how often your suite lies to you, but you need the others to know where the problem is concentrated and what it is costing. Anecdotes about "that one test that's always red" are not measurement; they are noise.


## The core metric: flake rate


Flake rate is the proportion of test executions that fail and then pass without any code change. You calculate it by detecting reruns of the same test on the same commit where the result differs.


- A low flake rate means a build is red because the product is broken, which is the signal you want.

- A high flake rate means engineers cannot trust red builds, so they stop reading them, which is the worst possible outcome for quality.


Measure it per test and in aggregate. The aggregate tells you how trustworthy the suite is; the per-test view tells you where to act.


## Supporting metrics


Flake rate alone does not tell you the whole story. Track these alongside it:


- **Distinct flaky tests.** Ten flakes from one test is very different from one flake each across ten tests. The first is a quick win; the second is systemic.

- **First-attempt pass rate.** What share of pipelines go green without any retry or rerun? This is what your real-world reliability looks like, before any masking.

- **Mean time to triage.** How long from a flaky failure appearing to being diagnosed and ticketed? Long triage times mean flakiness is silently draining engineering hours.

- **Quarantine size and age.** How many tests are parked, and for how long? A growing, ageing quarantine is a backlog you are pretending not to have.

- **Flake recurrence.** How often does a test return to flakiness after being "fixed"? High recurrence means fixes are superficial.


## How to detect a flake in the first place


You cannot measure what you do not detect. The standard approaches are:


- **Rerun on failure** and compare results on the identical commit. A differing result is a flake.

- **Periodic scheduled reruns** of the full suite against an unchanged build, so flakes surface even when nobody is shipping.

- **History analysis,** looking for tests whose pass/fail status oscillates across runs without corresponding code changes.


Each method has trade-offs in cost and speed, but all share the same logic: same code, different result equals flake.


## Turning metrics into action


Numbers are only useful if they change behaviour. Tie each metric to a response:


1. **If aggregate flake rate rises,** treat it as a release-quality risk and prioritise triage capacity.

2. **If a few tests dominate the flake count,** fix or quarantine those first for the biggest immediate gain.

3. **If first-attempt pass rate is low but builds are mostly green,** you are over-relying on retries and masking instability.

4. **If quarantine is growing,** schedule dedicated time, because quarantine without follow-through just relocates the problem.

5. **If recurrence is high,** audit your fixes; you are likely patching symptoms rather than root causes.


## Common measurement mistakes


- **Counting only failures, not flakiness.** A failing test is not necessarily flaky; conflating the two pollutes your data.

- **Ignoring environment.** The same test can be stable locally and flaky in CI. Always record where the run happened.

- **Measuring once.** Flakiness is a trend, not a snapshot. Track it over time to see whether you are improving.


## Why this is worth the effort


Flakiness has a compounding cost: wasted CI minutes, lost engineering hours, delayed releases, and, most corrosively, a loss of trust in the test suite. Quantifying it converts a vague frustration into a managed metric you can drive down. neart.ai builds enterprise-grade quality products that automate flake detection and surface these metrics, because the detection and bookkeeping are exactly the parts teams cannot sustain manually.


## Takeaway


Measure flakiness with flake rate as your headline number, supported by distinct flaky test count, first-attempt pass rate, triage time, and quarantine health. Detect flakes by comparing results on identical code, track everything as a trend, and tie each metric to a concrete response so the data actually drives the flake rate down.

Related posts

Software Quality

How Do You Ship Software Without Regressions?

Software Quality

What Is End-to-End Testing, and When Should You Use It?

Software Quality

What Does WCAG 2.2 Mean for Your Testing Strategy?