From testing-plugin
Runs single test file in fail-fast mode for Playwright, Vitest, Jest, pytest, Cargo test, and Go test. Supports --serial and --debug flags for rapid iteration.
npx claudepluginhub laurigates/claude-plugins --plugin testing-pluginThis skill is limited to using the following tools:
- Project files: !`find . -maxdepth 1 \( -name 'pyproject.toml' -o -name 'package.json' -o -name 'Cargo.toml' -o -name 'go.mod' \)`
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
find . -maxdepth 1 \( -name 'pyproject.toml' -o -name 'package.json' -o -name 'Cargo.toml' -o -name 'go.mod' \)find . -maxdepth 1 -name 'playwright.config.*'find . -maxdepth 1 \( -name 'vitest.config.*' -o -name 'vite.config.*' \)find . -maxdepth 1 -name 'jest.config.*'find . -maxdepth 1 \( -name pyproject.toml -o -name setup.cfg \) -exec grep -l 'pytest' {} +find . -maxdepth 1 -name 'package.json' -type f$1 (required): Test file path or pattern (e.g., login.spec.ts, tests/e2e/auth.spec.ts)--serial: Force sequential execution with single worker (useful for WebGL, database tests)--debug: Run in debug/headed mode for visual debuggingRun a single test file in fail-fast mode for rapid development iteration. Stop immediately on first failure to minimize feedback time.
Playwright (if playwright.config.* exists):
# Standard fail-fast
bunx playwright test "$FILE" --max-failures=1 --reporter=line
# With --serial (WebGL, shared state)
bunx playwright test "$FILE" --max-failures=1 --workers=1 --reporter=line
# With --debug
bunx playwright test "$FILE" --max-failures=1 --headed --debug
Vitest (if vitest.config.* or vite.config.* exists):
# Standard fail-fast
bunx vitest run "$FILE" --bail=1 --reporter=dot
# With --serial
bunx vitest run "$FILE" --bail=1 --pool=forks --poolOptions.threads.singleThread --reporter=dot
# With --debug
bunx vitest run "$FILE" --bail=1 --inspect-brk
Jest (if jest.config.* exists):
# Standard fail-fast
bunx jest "$FILE" --bail --silent
# With --serial
bunx jest "$FILE" --bail --runInBand --silent
# With --debug
bunx jest "$FILE" --bail --runInBand
pytest (Python projects):
# Standard fail-fast
python -m pytest "$FILE" -x -v --tb=short
# With --serial (already serial by default)
python -m pytest "$FILE" -x -v --tb=short
# With --debug
python -m pytest "$FILE" -x -v --tb=long -s
Cargo test (Rust projects):
# Standard fail-fast
cargo test --test "$FILE" -- --test-threads=1
# With --debug
cargo test --test "$FILE" -- --test-threads=1 --nocapture
Go test:
# Standard fail-fast
go test -v -failfast "$FILE"
# With --debug
go test -v -failfast "$FILE" -count=1
Run the constructed command. Capture and display output.
If the test passes:
[FILE]: PASSED
Duration: Xs
Ready for next iteration or file.
If the test fails:
[FILE]: FAILED (stopped at first failure)
Duration: Xs
First failure:
Test: [test name]
Error: [brief error message]
Location: [file:line]
Quick actions:
- Fix the issue and re-run: /test:focus [same file]
- Debug visually: /test:focus [file] --debug
- See full output: /test:run [file]
Always show the exact command to rerun:
Rerun: /test:focus $FILE
Focused testing dramatically reduces feedback time:
| Approach | Typical Duration | Use Case |
|---|---|---|
/test:focus | 2-30 seconds | Iterating on single file |
/test:quick | 30 seconds | Unit tests after changes |
/test:full | 5-30 minutes | Before commit/PR |
| Context | Flags |
|---|---|
| Playwright fast | --max-failures=1 --reporter=line |
| Playwright WebGL | --max-failures=1 --workers=1 --reporter=line |
| Vitest fast | --bail=1 --reporter=dot |
| Jest fast | --bail --silent |
| pytest fast | -x -v --tb=short |
glob and suggest corrections--serial flag or increasing timeout