Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flaky-test-hunter

Claude Code plugin that detects, quarantines, and helps fix flaky tests by analyzing CI run history and test timing patterns.

Install

claude plugin install flaky-test-hunter

Or clone and link locally:

git clone https://github.com/mturac/flaky-test-hunter
cd flaky-test-hunter
claude plugin link .

Commands

Command Description
/flaky-hunt Scan test result history and detect flaky tests
/flaky-quarantine [test-name] Safely skip a flaky test with documented reason
/flaky-report Show quarantine dashboard and CI time wasted
/flaky-fix Get fix suggestions per detected root cause pattern

Example Flakiness Report

╔══════════════════════════════════════════════════════════════════════════╗
║                     FLAKY TEST DASHBOARD                                ║
╠══════════════════════════════════════════════════════════════════════════╣
║ Quarantined: 3 tests | Wasted CI time: ~22 min/day | Open issues: 3   ║
╠════╦══════════════════════════╦══════════╦══════════╦═══════════════════╣
║ #  ║ Test                     ║ Flaky %  ║ Age      ║ Wasted/day        ║
╠════╬══════════════════════════╬══════════╬══════════╬═══════════════════╣
║ 1  ║ auth > login race cond.  ║ 80%      ║ 45 days  ║ ~8 min/day [!]    ║
║ 2  ║ db > cleanup orphan recs ║ 60%      ║ 30 days  ║ ~12 min/day [!]   ║
║ 3  ║ api > fetch with timeout ║ 40%      ║ 7 days   ║ ~2 min/day        ║
╚════╩══════════════════════════╩══════════╩══════════╩═══════════════════╝

[!] = Urgent (quarantined > 30 days)

Supported Test Runners

  • Jest (--json reporter)
  • Vitest (JSON reporter)
  • pytest (pytest-json-report)
  • Mocha (JUnit XML)
  • Any runner that outputs JUnit XML

How Flakiness is Scored

flakiness_score = (fail_count / total_runs) * 100

Tests are classified as flaky if they have both PASS and FAIL results across 3+ identical runs.

Root cause patterns detected: async (race conditions), order (suite dependencies), resource (missing cleanup), external (unmocked network/DB), timing (duration variance).

Files Created by This Plugin

File Purpose
.flaky-results.json Raw detection results from /flaky-hunt
.flaky-quarantine.json Log of quarantined tests with dates and issue links

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors