Part II β The Shield
4 Testing
GoalBuild a test suite that catches regressions without slowing the team down.
- 4.1 Testing Overview Buy the most confidence per second of CI time β that ratio decides the shape of your suite.
- 4.2 Unit & Integration Testing Unit tests prove one thing in isolation; integration tests prove the seams between them hold.
- 4.3 E2E and Automation Testing A real browser walking a real user journey β few of them, and none of them flaky.
- 4.4 A/B Testing Ship two versions to real users, measure one metric, and let the data decide.
- 4.5 Performance Testing Turn performance into a build gate with numbers, so regressions fail CI instead of shipping.
- 4.6 Test-Driven Development Write the failing test first β it forces you to design the interface before the implementation.
- 4.7 Security Testing Automate the scans that never get done manually, and put them in the pipeline as gates.
- 4.8 [BONUS] Testing React Components Query the way a user finds things, act the way a user acts, assert on what a user sees.
Capstone
Write the test plan for a search-with-autocomplete feature across all four layers β unit, integration, E2E, and performance β and say what each layer alone would miss.