Failure rate spike alerts for CI test runs
TestNod's failure rate spike detection watches what share of your tests fail on every CI run and fires an alert when a run comes in well above the recent average. Where flaky test detection tracks individual tests that pass and fail without any code changing, this alert looks at the suite as a whole, so it catches the run where a regression landed and a batch of tests went red together. The check runs automatically against every new test run that finishes with at least one failure or error.
How TestNod detects a failure rate spike
When a test run finishes processing, TestNod takes the 20 most recent processed runs in the project that share the same set of tags as the new run, not counting the new run itself. For each of those, it computes a failure rate as a percentage:
failure_rate = ((failures + errors) / total_tests) * 100
Errors count alongside failures on both sides of the comparison, since a test that blew up before it could assert anything is as broken as one that failed an assertion. Runs that reported no tests at all are excluded, because there is no rate to draw from them. TestNod averages the remaining rates into a baseline, computes the same rate for the new run, and the alert fires when:
current_failure_rate - baseline_failure_rate >= threshold_percentage
The default threshold is 15 percentage points. For example, a suite that normally fails at 2% triggers the alert on a run that comes in at 17% or worse.
Why the threshold is measured in percentage points
The threshold is the gap between the run's failure rate and the baseline. A multiplier wouldn't work across different baselines, since doubling a 1% failure rate adds one failure per hundred tests while doubling a 30% rate adds thirty. A gap in percentage points means the same thing wherever your suite normally sits, and it also works for a suite that's usually all green, where any relative increase over a 0% baseline would be infinite.
The 20-run baseline for failure rate analysis
The check only fires once a project has at least 20 processed runs on the same set of tags. Until a tag combination reaches that count, TestNod skips it without recording an event, because an average drawn from a handful of runs moves too much to compare against.
A few runs with no tests in the window don't stop the check, but if fewer than 15 of the 20 came back with results, TestNod skips it because the average would rest on too few runs.
Example: detecting a spike in CI test failures
The following example uses a project that tags every CI run with ci and integration and leaves the threshold at the default 15 percentage points. Across the last 20 runs on that tag set, roughly 2 tests out of 100 failed each time, giving a baseline failure rate of 2%.
The next run reports 15 failures and 5 errors out of 100 tests, a failure rate of 20%. The gap is 18 percentage points, which clears the threshold, so the alert fires and records the run's rate alongside the 2% average it was measured against.
What the alert event shows
Each occurrence on the alert detail page reads as a single line covering the rate the run came in at, the average it was measured against, how many recent runs went into that average, and how many of the run's tests failed. When the recent runs were all green, the line reports that the rate jumped after a stretch with no failures rather than quoting a 0% average.
Every occurrence links back to the test run that triggered it, where the What Changed panel lists which tests started failing. The tag set behind the comparison is shown near the top of the alert page.

Tuning the failure rate threshold
The right threshold depends on how often your suite already fails:
- 5 points is aggressive and suits a suite that is reliably green, where any cluster of new failures is worth a look. Expect more alerts if your suite has flaky tests.
- 15 points (default) ignores small day-to-day changes and fires when a large share of the suite breaks at once.
- 25 points or higher only catches large breakages. Use it when your suite fails often enough that smaller jumps don't need a response.
If your recent runs have been entirely green, the baseline sits at zero and the threshold becomes the plain failure rate that triggers the alert. For example, a project left on the default fires the first time 15% of the suite goes red, and with a low threshold a handful of failures in one run is enough.
Project admins set the threshold from the alert configuration page, where the field is labeled Threshold percentage. For this check, read the number you enter as the size of the jump rather than as a failure rate on its own. See Configuring alerts for the walkthrough.
What the alert does not catch
- Projects without 20 same-tag runs yet. New projects and new tag combinations aren't checked until they have 20 runs of history.
- A failure rate that climbs slowly. This alert measures the jump from the baseline, so if a suite degrades a little each week, each run sits close to its own baseline and nothing fires, even though the suite has drifted badly over a month. Skipped test creep covers the equivalent slow drift for skipped tests.
- A failure rate that stays high. Once a bad rate persists long enough to become the baseline, the gap closes and the alert stops firing. The alert tells you when the build broke, and it doesn't keep firing until the failures are fixed.
- A single test that fails intermittently. That's what flaky test detection is for.
Where to start
An admin turns on the failure rate spike alert and sets its threshold from the alert configuration page. When a run with 20 same-tag runs of history behind it clears the threshold, TestNod records an event on the alert detail page and emails the project members who haven't opted out.
If you haven't sent your first test run yet, the Quickstart walks through generating JUnit XML reports and uploading them from your CI in about five minutes.