testing-strategylisted
Install: claude install-skill kouroshez/coding-os
# Testing Strategy — Pick the Right Layer
A practical playbook for designing test suites that catch real bugs without the suite itself becoming the bug. Stack-agnostic core; concrete recipes target this project's languages.
## When to Use This Skill
- Adding the first test to a new module — the shape you ship now sets the suite's trajectory.
- Reviewing a PR where the test ratio looks off (e.g. all unit, no contract; all e2e, no unit).
- Investigating a flaky / slow suite — the cure is almost never "add retries".
- Deciding coverage targets for a service (90% lines is the wrong target).
- Adding tests to a bug fix — the fix without a regression test will return.
- Migrating from manual QA → automated CI.
Skip when: writing throwaway exploration code. Real code, real tests.
## The Test Pyramid (still right, refined for 2026)
```
┌─────────┐
│ E2E │ ~5% slow, flake-prone, golden-path
┌───┴─────────┴───┐
│ Contract + │ ~15% pact, OpenAPI, GraphQL schema
│ Integration │
┌───┴─────────────────┴───┐
│ │
│ Unit + Property │ ~80% fast (ms), deterministic
│ │
└──────────────────────────┘
```
Targets are guidance, not law. A library has more unit + property than a deployment-heavy SaaS. A regulated app has more contract + integration than a hackathon prototype. **What stays constant: most tes