Move testing activities earlier in the development lifecycle to catch defects when they're cheapest to fix. Use when implementing TDD, CI/CD, or early quality practices.
<default_to_action> When implementing early testing practices:
Quick Shift-Left Levels:
Critical Success Factors:
| Phase | Relative Cost | Example |
|---|---|---|
| Requirements | 1x | Fix doc: 30 min |
| Design | 5x | Redesign: few hours |
| Development | 10x | Code fix: 1 day |
| Testing | 20x | Fix + retest: 2 days |
| Production | 100x | Hotfix + rollback + investigation |
/\ E2E (10%) - Critical user journeys
/ \
/ \ Integration (20%) - Component interactions
/ \
/________\ Unit (70%) - Fast, isolated, comprehensive
| Level | Practice | When |
|---|---|---|
| 1 | Unit tests in PR | Before merge |
| 2 | TDD | Before implementation |
| 3 | BDD/Example Mapping | During refinement |
| 4 | Risk Analysis | During design |
# CI pipeline - tests run on every commit