
testing-plugin
Testing plugin that runs tiered test suites, enforces TDD, and audits test quality for Claude Code.
- version
- 3.27.2
- GitHub stars
- 60
What it does
- Adds the
test-runneragent and 19 skills, includingtest-quick,test-full,test-focus,test-report, andtest-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-testingandtest-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-pluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install testing-plugin@laurigates-claude-pluginsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceBenchmark 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 set | Load-testing an HTTP service → networking-plugin:http-load-testing |
Two timing tools (hyperfine, a shell loop, /usr/bin/time) report different numbers for one command | The 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 withcp -a --reflink=always ~/.rustup/toolchainsbefore timing, which turned the "unshared" control~/.rustup(198,319 files) into reflinked inodes. It was reported as "nothing shared":--shared-blocks769.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 -Nmeasured 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/timeruns 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+closeacross 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 GCPn2-standard-8KVM 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:
| Export | 1.x | 2.0 |
|---|---|---|
--export-csv header | command,mean,stddev,median,user,system,min,max | command,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 CSV | user, system columns | Absent unless selected: --metrics time adds time_cpu_*, time_user_*, time_system_* |
--export-json mean | results[i].mean | results[i].summary.time_wall_clock.mean (schema_version: 2) |
| Per-run times in JSON | results[i].times | results[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 reportsmean=0.0. - Check the version before parsing:
hyperfine --version, orschema_versionin the JSON. Switching to--export-jsonalone does not avoid the change. - 2.0 also runs commands without a shell by default (
--shell=none); pass-Swhere 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.0under 2.0.0 and raised no error. The header change is confirmed in hyperfine'ssrc/export/csv.rsat 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 againstmain).
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
| Skill | Description |
|---|---|
test-run | Run the project's tests — whole suite or a name pattern, framework auto-detected |
test-quick | Unit tier only — skips slow, integration, and E2E tests for sub-30s feedback |
test-focus | One test file, fail-fast — headed/debug and serial single-worker modes |
test-full | Every tier in pyramid order — unit, integration, E2E; coverage optional |
test-setup | Configure testing infrastructure with CI/CD integration |
test-consult | Consult test-architecture agent for testing strategy |
test-report | Cached results from the last run — pass/fail, coverage, history, flaky tests — no re-run |
test-analyze | Analyze test results for patterns and improvements |
test-tier-selection | Decide which tier a change needs (unit / integration / E2E); runs nothing itself |
test-quality-analysis | Analyze and improve test quality |
test-strategy-review | Audit whether a green suite actually tests what you aim for (adversarial + tests-hidden cold read, verified) |
test-tripwire | A test that fails when an unenforced code assumption breaks — replaces an issue that defers a fix until a list, limit or version changes |
benchmark-controls | Benchmark 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-controls | Trust 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-testing | Property-based testing with fast-check (TS/JS) and Hypothesis (Python) |
mutation-testing | Mutation testing for quality validation |
vitest-testing | Vitest testing framework patterns; jsdom's limits and the DOM assertions that silently pass against the bug |
playwright-testing | Playwright E2E testing framework patterns |
playwright-cli | Playwright CLI browser automation for AI agents |
odiff-image-diffing | Fast pixel-by-pixel image comparison for visual regression |
Agents
| Agent | Description |
|---|---|
test-runner | Test execution, failure analysis, concise reporting |
test-architecture | Test strategies, coverage analysis, framework selection |
Tiered Test Execution
| Tier | When to Run | Command | Duration |
|---|---|---|---|
| Unit | After every change | /test:quick | < 30s |
| Integration | After feature completion | /test:full | < 5min |
| E2E | Before commit/PR | /test:full | < 30min |
TDD Workflow
The plugin enforces RED → GREEN → REFACTOR:
- RED: Write a failing test that defines desired behavior
- GREEN: Implement minimal code to make the test pass
- 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- tools-pluginv2.16.2
- typescript-pluginv1.10.4
- video-pluginv2.0.2
- workflow-orchestration-pluginv1.20.0
- youtube-pluginv1.1.0
- accessibility-pluginv2.3.6
- agent-patterns-pluginv2.58.5
- agents-pluginv1.16.3
- api-pluginv2.0.1
- bevy-pluginv1.4.2
- bios-pluginv1.2.0
- blog-pluginv1.3.4
- blueprint-pluginv3.52.0
- cloud-pluginv1.1.1
- code-quality-pluginv1.30.4
- codebase-attributes-pluginv1.3.4
- comfyui-pluginv1.15.7
- communication-pluginv1.2.7
- component-patterns-pluginv1.5.4
- configure-pluginv1.43.12
- container-pluginv2.11.5
- css-pluginv1.2.4
- documentation-pluginv1.16.1
- evaluate-pluginv1.21.1
Similar to testing-plugin
More Testing & QA
testing-strategiesPluginmiles990/claude-software-skills26 starsUnit, integration, E2E testing and TDD practices
python-testingSkilllaurigates/claude-plugins468 installsPytest-based Python testing reference covering fixtures, parametrization, coverage, markers, and mocking patterns.
jutsu-pytestPluginTheBushidoCollective/han201 starsComprehensive Pytest testing framework skills for Python projects with fixtures, plugins, and advanced testing patterns.
unit-testingPluginwshobson/agents42.8K starsUnit and integration test automation for Python and JavaScript with debugging support
commands-code-analysis-testingPlugindavepoon/buildwithclaude3.8K starsCommands for code review, testing, and analysis
dev-practicesPluginspences10/claude-code-toolkit37 starsDevelopment practices: TDD workflow with red-green-refactor