New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Testing plugin that runs tiered test suites, enforces TDD, and audits test quality for Claude Code.

version
3.27.2
GitHub stars
60
View on GitHub

What it does

  • Adds the test-runner agent and 19 skills, including test-quick, test-full, test-focus, test-report, and test-setup
  • Runs tests in tiers: unit after every change, integration after features, and E2E before commit or PR
  • Enforces a RED, GREEN, REFACTOR cycle and checks suites with mutation-testing and test-strategy-review
  • Covers Vitest, Playwright, fast-check, Hypothesis, and odiff screenshot diffing for visual regressions

Test execution, TDD workflow, and testing strategies

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install testing-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Benchmark Controls

A benchmark comparison discriminates only while its control stays the condition it was chosen to represent. Four routes take that away without any error: the fixture step edits the control, the timing harness is itself a variable, the machine magnifies the effect being measured, or the parser reads the wrong column.

When to Use This Skill

Use this skill when...Use something else when...
Timing a code change against a baseline (A/B, before/after, branch vs main)Baselining a Mac's hardware health → macos-plugin:macos-performance-benchmark
Building benchmark fixtures from an existing data setLoad-testing an HTTP service → networking-plugin:http-load-testing
Two timing tools (hyperfine, a shell loop, /usr/bin/time) report different numbers for one commandThe comparison is a correctness harness pinned to a moving baseline → the sibling rule cited under Related

Deriving Test Data Can Mutate the Control

A step that builds a fixture from the control data set can change the control's own state: reflinks, hard links, chmod, atime, warmed caches. The control then measures the condition it was meant to exclude, and nothing in the result says so.

  • Time the control before deriving anything from it, or derive from a copy.
  • Record in the results how each data set was produced, including every step that read or copied it.

Observed 2026-10 (dust --shared-blocks, XFS). The "shared" set was built with cp -a --reflink=always ~/.rustup/toolchains before timing, which turned the "unshared" control ~/.rustup (198,319 files) into reflinked inodes. It was reported as "nothing shared": --shared-blocks 769.4 ms vs master 96.6 ms (8.0x). A never-reflinked tree, /usr/share (128,365 files), measured 126.3 vs 66.0 ms (1.9x), and the PR's numbers were corrected. Unverified: whether XFS keeps an inode's reflink flag after the copies are deleted.

Two Timing Harnesses That Disagree Are Both Suspect

Before trusting either number:

  • Alternate the two harnesses back to back on the same command, then repeat on a non-blocking control.
  • Use the same harness and flags on every machine being compared.
  • Name the harness next to every number it produced.

Observed 2026-10 (dust, Linux desktop, kernel 6.17, cpufreq governor powersave). hyperfine -N measured the lock-bound case at ~740 ms; a plain bash loop timing the same command measured ~520 ms, consistently when the two alternated. Single /usr/bin/time runs agreed with the loop (0.49–0.60 s). On the non-blocking baseline the methods were within ~6%, and on macOS within ~2% for every case. Cause not established; scheduling sensitivity of a lock convoy is an unproven hypothesis.

A Desktop-Hypervisor VM Can Turn a Lock Ceiling Into a Slowdown

Lock contention and thread-scaling results from a desktop-hypervisor VM (OrbStack on the Apple Virtualization framework) are provisional. There a contended spinlock can make throughput fall as threads are added, where bare metal shows only a plateau, so the gain from removing the lock is overstated.

  • Confirm a lock or scaling result on bare metal, or on a cloud KVM guest, before reporting its size.
  • Report the gain per machine, naming the hypervisor; never quote the VM figure alone.

Observed 2026-11 (dust, open + close across threads). On an OrbStack VM with 13 vCPUs, throughput fell past 4 threads. The process-wide fd-table spinlock (files->file_lock) took the paravirtual qspinlock slow path on 99.9% of acquisitions at 13 threads, with 4–8 µs handoff peaks. On bare metal (Ryzen 9 3900X, 24 threads) and on a GCP n2-standard-8 KVM guest, which also enables PV spinlocks, the same lock only capped throughput. Removing it measured 2.1–2.5× on OrbStack, 10–11% on bare metal and about 3.5% on GCP. The lock cost 45 of 75 ms on OrbStack, 10 of 73 ms on bare metal and 4 of 99 ms on GCP. PV spinlocks alone do not explain the difference, since the GCP guest has them too.

hyperfine 2.0 Renamed Its Export Fields

A parser written against hyperfine 1.x reads 2.x output without an error and gets wrong numbers. Both export formats changed in 2.0.0:

Export1.x2.0
--export-csv headercommand,mean,stddev,median,user,system,min,maxcommand,time_wall_clock_unit,time_wall_clock_mean,…_stddev,…_median,…_min,…_max, then the same six columns for each further metric (memory_peak_resident_* by default)
User/system time in CSVuser, system columnsAbsent unless selected: --metrics time adds time_cpu_*, time_user_*, time_system_*
--export-json meanresults[i].meanresults[i].summary.time_wall_clock.mean (schema_version: 2)
Per-run times in JSONresults[i].timesresults[i].measurements[j].time_wall_clock.value
  • Read CSV by header name, never by column position: in 2.0 column 2 is the unit (s), so a positional parser reports mean=0.0.
  • Check the version before parsing: hyperfine --version, or schema_version in the JSON. Switching to --export-json alone does not avoid the change.
  • 2.0 also runs commands without a shell by default (--shell=none); pass -S where 1.x shell behaviour is needed, and use the same setting on every machine compared.

Observed 2026-11 (dust benchmarks). A script parsing hyperfine CSV by the 1.x positions printed mean=0.0 under 2.0.0 and raised no error. The header change is confirmed in hyperfine's src/export/csv.rs at v1.18.0, v1.21.0 and v2.0.0, and the JSON change in the v2.0.0 changelog.

Related

  • ~/.claude/rules/validate-adversarial-constructions.md § "A comparison harness pinned to a moving baseline stops discriminating" covers the case where the baseline itself moves between runs (a regenerated golden file, a drift check against main).

Readme

Testing Plugin

Test execution, TDD workflow, testing strategies, and quality analysis for Claude Code.

Overview

This plugin provides comprehensive testing support including test runners, TDD workflows, testing strategies, and quality analysis. It supports tiered test execution (unit, integration, e2e) and multiple testing frameworks.

Skills

SkillDescription
test-runRun the project's tests — whole suite or a name pattern, framework auto-detected
test-quickUnit tier only — skips slow, integration, and E2E tests for sub-30s feedback
test-focusOne test file, fail-fast — headed/debug and serial single-worker modes
test-fullEvery tier in pyramid order — unit, integration, E2E; coverage optional
test-setupConfigure testing infrastructure with CI/CD integration
test-consultConsult test-architecture agent for testing strategy
test-reportCached results from the last run — pass/fail, coverage, history, flaky tests — no re-run
test-analyzeAnalyze test results for patterns and improvements
test-tier-selectionDecide which tier a change needs (unit / integration / E2E); runs nothing itself
test-quality-analysisAnalyze and improve test quality
test-strategy-reviewAudit whether a green suite actually tests what you aim for (adversarial + tests-hidden cold read, verified)
test-tripwireA test that fails when an unenforced code assumption breaks — replaces an issue that defers a fix until a list, limit or version changes
benchmark-controlsBenchmark control hazards — a fixture step that mutates the control, two timing harnesses that disagree, lock scaling exaggerated by a desktop-hypervisor VM, hyperfine 2.0's renamed export fields
measurement-controlsTrust a measurement before it gates work — A/B arms that differ only in the variable, an oracle gated on a known-good case, pooled correlations and x/N rates, locating an event by scanning, per-axis metric authority, per-layer stems, per-stream guarantees
property-based-testingProperty-based testing with fast-check (TS/JS) and Hypothesis (Python)
mutation-testingMutation testing for quality validation
vitest-testingVitest testing framework patterns; jsdom's limits and the DOM assertions that silently pass against the bug
playwright-testingPlaywright E2E testing framework patterns
playwright-cliPlaywright CLI browser automation for AI agents
odiff-image-diffingFast pixel-by-pixel image comparison for visual regression

Agents

AgentDescription
test-runnerTest execution, failure analysis, concise reporting
test-architectureTest strategies, coverage analysis, framework selection

Tiered Test Execution

TierWhen to RunCommandDuration
UnitAfter every change/test:quick< 30s
IntegrationAfter feature completion/test:full< 5min
E2EBefore commit/PR/test:full< 30min

TDD Workflow

The plugin enforces RED → GREEN → REFACTOR:

  1. RED: Write a failing test that defines desired behavior
  2. GREEN: Implement minimal code to make the test pass
  3. REFACTOR: Improve code quality while keeping tests green

Usage Examples

Run Quick Tests

/test:quick

Runs only fast unit tests, skipping slow integration and E2E tests.

Focus on Single File

/test:focus login.spec.ts
/test:focus tests/e2e/auth.spec.ts --serial

Runs a single test file with fail-fast mode. Stops immediately on first failure for rapid iteration. Use --serial for tests requiring sequential execution (WebGL, database state).

Full Test Suite

/test:full --coverage

Runs complete test suite with coverage reporting.

Consult on Test Strategy

/test:consult new-feature

Gets recommendations from test-architecture agent for testing a new feature.

Setup Testing Infrastructure

/test:setup --coverage --ci github

Configures testing framework with coverage thresholds and GitHub Actions CI.

Companion Plugins

Works well with:

  • python-plugin - For pytest-advanced skill
  • typescript-plugin - For additional TypeScript testing patterns
  • code-quality-plugin - For test code review

Installation

/plugin install testing-plugin@laurigates-claude-plugins

License

MIT

Details

Marketplace
laurigates/claude-plugins
Source
testing-plugin
Author
Lauri Gates
Category
Testing
License
MIT
Keywords
testing, tdd, pytest, vitest, coverage, odiff, image-diff, visual-regression
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to testing-plugin

More Testing & QA