testing-strategylisted
Install: claude install-skill komluk/scaffolding
# Testing Strategy Skill
## Purpose
Comprehensive testing guidelines including test pyramid, coverage targets, and test patterns.
## Auto-Invoke Triggers
- Planning test strategy
- Writing unit/integration tests
- Reviewing test coverage
- Setting up test infrastructure
---
## Test Pyramid
```
/\
/ \ E2E Tests (10%)
/----\ - Critical user flows
/ \ - Slow, expensive
/--------\ Integration Tests (20%)
/ \ - API tests, DB tests
/------------\ - Medium speed
/ \ Unit Tests (70%)
/----------------\ - Fast, isolated
- Business logic
```
### Distribution Guidelines
| Type | Percentage | Focus |
|------|------------|-------|
| Unit | 70% | Business logic, utilities |
| Integration | 20% | API, database, services |
| E2E | 10% | Critical user journeys |
---
## Coverage Targets
| Metric | Minimum | Target |
|--------|---------|--------|
| Line coverage | 70% | 80% |
| Branch coverage | 60% | 70% |
| Critical paths | 90% | 100% |
### What to Cover
- All public methods
- Business logic
- Edge cases
- Error handling
- Integration points
### What NOT to Cover
- Generated code
- Simple getters/setters
- Framework code
- Third-party libraries
---
## Unit Testing
### Principles
- Test one thing per test
- Tests should be fast (< 100ms)
- Tests should be isolated
- Tests should be deterministic
- No external dependencies
### AAA Pattern
```
Arrange - Set up test data and mocks
Act