Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

flaky-test-quarantine

FreeNo executable scriptsNot checked

Builds a quarantine workflow for flaky tests - marks the test with the framework's skip/fixme/retry annotation, records the failure-rate observation and a…

testlandby testland★ 18 GitHub stars

About this skill

flaky-test-quarantine

Overview

A "flaky test" is a test that produces inconsistent pass/fail results across runs without an underlying code change (google-flaky). Industry consensus from Google Testing Blog and similar practitioner-engineering sources is that flaky tests should be isolated from the gating path rather than left to mask real regressions or be silently ignored (google-flaky).

Terminology note: "flaky test" is a practitioner-emergent term popularized by the Google Testing Blog. ISTQB does not maintain a canonical entry for it. This skill cites industry-engineering sources, not ISTQB authority.

How to use

  1. Confirm it is a flake, not a regression - a 1% to 50% failure rate, not 100% (see "When to use"). A 100%-failing test is a regression: bisect and fix, do not quarantine.
  2. Mark the test with the framework's skip / fixme / retry annotation (Step 1).
  3. Annotate the body with date, issue link, failure rate, bisect status, and a Re-evaluate by date (Step 2) - this is the load-bearing, machine-parseable part.
  4. Set the TTL that produces the Re-evaluate by date (Step 3).
  5. Wire the expired-quarantine report into a scheduled CI job (Step 4 and references/ci-quarantine-report.md).
  6. Prune on expiry - fix and un-quarantine, renew once (never past two consecutive renewals), or delete (Step 5).

When to use

  • A test is failing on the trunk between 1% and 50% of runs (above 50% it's not flaky, it's broken; under 1% the noise is acceptable for most projects).
  • The team's incident process has been triggered more than once by the same test.
  • A new feature merge is blocked by a known-flaky pre-existing test that's unrelated to the change.

If the test fails 100% of the time after a code change, it's a regression - bisect to the introducing commit and fix, do not quarantine.

Worked example

Test tests/checkout.spec.ts:42 fails about 12% of runs on the tablet-768 project in CI. An unrelated feature PR is blocked by it.

  1. Confirm it is a flake. 12% sits between 1% and 50%, and the test predates the PR - quarantine it, do not treat it as a regression of the PR under review.
  2. Mark and annotate with a single test.fixme() carrying the full record (Steps 1 and 2):
test('checkout flow flaky test', async ({ page }) => {
  test.fixme(
    true,
    'Quarantined 2026-07-20 (#1234) - fails ~12% of runs on tablet-768; bisect inconclusive. Re-evaluate by 2026-08-19. Owner: @web-platform.',
  );
  // ... test body, no longer runs
});
  1. Set the TTL. The default 30-day TTL (Step 3) puts Re-evaluate by 2026-08-19 in the annotation. The PR merges the same day, unblocked.
  2. Let CI track it. The Monday report job (Step 4) greps every test.fixme annotation. On the first Monday after 2026-08-19 it prints EXPIRED for this entry and opens a tracking issue.
  3. Prune. A fix for the tablet-768 layout race has since landed, so remove test.fixme(), re-run the test at depth to confirm it is green, and close the issue. Had it still failed, renew once with an updated annotation - never past two consecutive renewals.

Step 1 - Mark the test

Playwright

test.fixme() is the canonical Playwright primitive for "this test is broken; do not run past this point" (pw-test):

test('checkout flow flaky test', async ({ page }) => {
  test.fixme(
    true,
    'Quarantined 2026-05-04 (#1234) - fails ~12% of runs on tablet-768; bisect inconclusive. Re-evaluate by 2026-06-04.',
  );
  // ... test body, no longer runs
});

test.fixme(condition, description) skips with the description visible in the report. Unlike test.skip(), fixme carries the explicit "this needs to be fixed" intent (pw-test).

If the goal is to allow retries before quarantining, use the retries config first (pw-retries):

// playwright.config.ts
export default defineConfig({
  retries: process.env.CI ? 2 : 0,
});

A test that passes on retry is reported with the flaky status (distinct from passed and failed); track these separately - flaky-but-passing tests are quarantine candidates, not yet quarantined (pw-retries).

Cypress

Cypress configures retries at the suite level via Cypress.config('retries', { runMode: 2, openMode: 0 }). For quarantining individual specs, use it.skip(...) or the cypress-grep plugin's tagging convention.

Jest / Vitest

test.skip(...) and test.todo(...) are the canonical primitives. For periodic auto-evaluation, use test.skip.if(condition) patterns or i

Full SKILL.md on GitHub

Install flaky-test-quarantine in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

.tessl-plugin/plugin.jsonevals/brand-new-test-blocking-its-own-pr/criteria.jsonevals/brand-new-test-blocking-its-own-pr/task.mdevals/deletion-pr-review/criteria.jsonevals/deletion-pr-review/task.mdevals/disabled-annotations-audit/criteria.jsonevals/disabled-annotations-audit/task.mdevals/intermittent-capture-failure/criteria.jsonevals/intermittent-capture-failure/task.mdevals/nothing-tells-us-when-to-look-again/criteria.jsonevals/nothing-tells-us-when-to-look-again/task.mdevals/retry-everything-directive/criteria.jsonevals/retry-everything-directive/task.mdevals/rotted-skip-list-review/criteria.jsonevals/rotted-skip-list-review/task.mdevals/six-red-tests-before-branch-cut/criteria.jsonevals/six-red-tests-before-branch-cut/task.mdevals/standup-anecdotes-vs-run-history/criteria.jsonevals/standup-anecdotes-vs-run-history/task.mdevals/unowned-entries-routing/criteria.jsonevals/unowned-entries-routing/task.mdreferences/ci-quarantine-report.md

FAQ

What does the flaky-test-quarantine skill do?

Builds a quarantine workflow for flaky tests - marks the test with the framework's skip/fixme/retry annotation, records the failure-rate observation and a bisect link in the annotation body, sets an auto-expiry date, and produces a CI report listing every quarantined test that has expired and needs re-evaluation. Use when a flaky test is blocking the trunk and must be removed from the gating path without losing track of it.

How do I install the flaky-test-quarantine skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the flaky-test-quarantine skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare flaky-test-quarantine with