← ClaudeAtlas

testing-strategylisted

Choose the right test type for every change — unit, integration, contract, end-to-end, property-based, mutation, fuzz. Use when adding tests to a new feature, deciding what to test for a bug fix, designing a test pyramid for a service, evaluating coverage targets, or untangling a slow test suite. Stack-agnostic; concrete recipes target Python (pytest), TypeScript (Vitest/Jest/Playwright), and Go (table tests + testify). Pairs with clean-code (error-path tests) and observability (CI signal hygiene).
kouroshez/coding-os · ★ 4 · Testing & QA · score 76
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