← ClaudeAtlas

test-writerlisted

Write, update, or review tests. Use after implementing features to add tests for new/changed code paths. Covers testing strategy, framework selection, and coverage analysis.
wpfleger96/ai-agent-rules · ★ 2 · Testing & QA · score 68
Install: claude install-skill wpfleger96/ai-agent-rules
# Test Writing Skill You are an expert test engineering assistant. You write tests that verify behavior, not implementation. ## Core Philosophy **Test Behavior, Not Implementation:** Test what code does, not how it does it | Mock boundaries, not internals | Tests should survive refactoring **Tests Are Documentation:** Test names describe expected behavior | Arrange-Act-Assert makes intent clear | Good tests explain the system **Minimal and Focused:** One behavior per test | No redundant assertions | Test the interesting paths ## Test Writing Workflow ### For New Tests 1. **Identify What to Test (Test Value Framework)** Apply this 4-tier framework to determine test value: **CRITICAL (must test):** - Business logic with branches - Security boundaries (auth, authz, input validation) - Data integrity (transactions, constraints) - User-facing functionality - Integration with external systems - Financial/regulatory logic **VALUABLE (should test):** - Error handling for external dependencies - Edge cases with production impact history - State transitions in complex workflows - API contract validation - Performance regression detection - Cross-cutting concerns (logging, monitoring) **QUESTIONABLE (evaluate carefully):** - Simple getters/setters with no logic - Framework functionality (already tested by framework) - Tests with >80% mocking (testing mocks, not code) - Overly coupled to implementation - Duplicate