dev-testing
Installation
SKILL.md
Testing Strategy
Bias toward integration tests — they verify what users actually experience and survive refactoring. Unit tests are for pure logic with many branches. Part of the dev-* development-cycle skill set (see dev-cycle).
This skill covers the everyday suite that runs on every test invocation. For the heavier production-parity tier — real brokers, local blockchains, real sockets, network-fault injection, run on demand rather than per commit — see dev-e2e-testing.
Choose the Smallest Test That Proves the Contract
- Reuse existing coverage if it already detects a regression in the changed behavior. Trivial edits need no new test.
- For new nontrivial behavior or a bug fix, add a durable check at the cheapest stable seam: unit tests for pure logic, integration tests for storage/protocol contracts, E2E for cross-system behavior.
- Test the requested result and relevant failure cases, not a test-count or coverage-percentage quota. For a bug fix, observe the check fail before the fix and pass after it; expected values come from an independent source.
- Respect the requested test scope. Suggest a broader check only when the narrower one misses a concrete risk.
Databases: Match Fidelity to the Behavior
Use the project's existing local harness when it proves the contract: