testing-principles

Featured

Language-agnostic testing principles including TDD, test quality, coverage standards, and test design patterns. Use when writing tests, designing test strategies, or reviewing test quality.

Testing & QA 680 stars 102 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
94
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Language-Agnostic Testing Principles ## Test-Driven Development (TDD) Use this cycle for new or changed executable behavior and reproducible bug fixes. For a behavior-preserving refactor, first confirm existing tests pass or add passing characterization tests, then refactor and rerun the same regression evidence. RED: confirm the new test fails for the intended reason. GREEN: implement the smallest passing change. REFACTOR: improve structure while the test remains green. VERIFY: run the repository's applicable regression checks. ## Quality Requirements - Treat coverage as a diagnostic signal for finding untested areas, not a target — a target gets gamed into trivial tests (Goodhart's Law) - Concentrate tests on critical paths, business logic, and behavior whose regression would matter - Prioritize meaningful assertions over the coverage number; any CI threshold is the project's config, not a quality goal in itself - Use project-configured speed budgets when present. Otherwise investigate test speed only when observed feedback or CI cost is material to the current outcome; retain slower tests when their proof boundary requires it ## Test Design Rules - Structure each test as Arrange, one Act, and Assert; multiple assertions may prove one behavior. - Follow the repository's test naming convention and name the condition and observable outcome. - Exercise behavior through a public or integration boundary. Assertions verify return values, outputs, errors, or state changes...

Details

Author
shinpr
Repository
shinpr/claude-code-workflows
Created
11 months ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category