← ClaudeAtlas

testing-policylisted

Test strategy (test pyramid), coverage gates, deterministic tests, mocking discipline, and regression-first bug fixing. Use when writing or changing code that needs tests, when asked to add or fix tests, or after fixing a bug to add a regression test.
FJRG2007/enigma · ★ 1 · Testing & QA · score 74
Install: claude install-skill FJRG2007/enigma
# Testing Policy (Senior Engineering Standards) ## Activation Scope - Apply whenever code is written, changed, or fixed, and whenever the user asks for tests. - Owns test strategy, coverage expectations, determinism, and test-first discipline. --- ## Core Principle - Untested behavior is unverified behavior. Treat tests as part of the deliverable, not an afterthought. - A change is not done until its behavior is covered and the suite passes. - Tests exist to catch regressions and document intended behavior, not to inflate coverage numbers. --- ## Test Strategy (Pyramid) - Favor many fast unit tests, fewer integration tests, and a small number of end-to-end tests. - Unit: pure logic and single modules in isolation. - Integration: module boundaries, data access, and contracts between services. - End-to-end: critical user-facing flows only. - Push verification to the lowest layer that can prove the behavior. --- ## What To Test - Every bug fix starts with a failing test that reproduces the bug, then the fix makes it pass (regression-first). - Cover happy paths, boundary conditions, and failure/error paths. - Test edge cases: empty, null, max size, invalid input, concurrency, and timezone/locale where relevant. - Test public behavior and contracts, not private implementation details. - For input handling, assert that invalid input is rejected as defined in validation-policy. --- ## Test Quality Rules - Tests must be deterministic: no reliance on real time, randomnes