testing-patterns
SKILL.md
Testing Patterns
Write tests that catch bugs, not tests that pass. — Confidence through coverage, speed through isolation.
Testing Pyramid
| Level | Ratio | Speed | Cost | Confidence | Scope |
|---|---|---|---|---|---|
| Unit | ~70% | ms | Low | Low (isolated) | Single function/class |
| Integration | ~20% | seconds | Medium | Medium | Module boundaries, APIs, DB |
| E2E | ~10% | minutes | High | High (realistic) | Full user workflows |
Rule: If your E2E tests outnumber your unit tests, invert the pyramid.