targeted-testing
Pick and run the smallest correct validation step (checks → focused Jest by path → broader suites). Use whenever you modify code and need confidence quickly.
When & Why to Use This Skill
This Claude skill optimizes the software development lifecycle by implementing a 'targeted testing' strategy. It enables developers to identify and execute the most granular validation steps—ranging from local check scripts to specific Jest test paths—ensuring rapid feedback loops while minimizing the overhead of running slow or irrelevant test suites. By following a structured validation ladder, it enhances developer productivity and maintains high code quality with minimal latency.
Use Cases
- Rapid Code Validation: Quickly verify specific bug fixes or feature updates by running only the smallest relevant test suite instead of the entire codebase.
- Efficient CI/CD Workflows: Prevent slow or flaky test runs by prioritizing local, deterministic check scripts before escalating to broader integration tests.
- UI and Scenario Testing: Execute specific browser-based scenarios using dedicated runners for UI changes that require validation without the weight of full E2E suites.
- Automated Documentation: Maintain a clear audit trail of testing activities by recording exact commands and outcomes in session notes and working logs.
| name | targeted-testing |
|---|---|
| description | Pick and run the smallest correct validation step (checks → focused Jest by path → broader suites). Use whenever you modify code and need confidence quickly. |
Targeted Testing
Scope
- Select the smallest test/check that proves the change
- Prevent slow, flaky, or irrelevant test runs
- Capture evidence in session notes
Inputs
- Files changed
- Whether the change is UI server / CLI / DB adapter / crawler
- Existing check scripts near the code
Procedure
- Prefer a local check script first (fast, deterministic, exits cleanly).
- Then run the smallest Jest suite by path.
- Only then widen to broader suites if needed.
- Record the exact commands and outcomes in
WORKING_NOTES.md.
If you need browser semantics but don’t want full Jest E2E yet, prefer the single-browser scenario runner:
node tools/dev/ui-scenario-suite.js --suite=scripts/ui/scenarios/<suite>.suite.js --scenario=001 --print-logs-on-failure
Validation
- Official Jest invocation rule (repo policy): use
npm run test:by-path <file>.
Escalation / Research request
Ask for dedicated research if:
- there is no obvious “smallest check” and you need a new check harness
- the feature spans multiple systems and you need a validation ladder proposal
References
- Testing quick reference:
docs/TESTING_QUICK_REFERENCE.md - Validation ladder guidance:
AGENTS.md