Testing, CI/CD & Shipping Safely
Intermediate · 13 missions · about 4 hours
AI writes code faster than anyone can review it, so tests become your safety net. Build your own testing tools, write tests that actually catch bugs, wire up CI that blocks bad merges, and release with feature flags, canaries and fast rollbacks.
Missions
- Why tests matter more with AI: Regressions, the test pyramid and what makes a test worth having.
- Build your own expect(): Write the assertion library that Jest and Vitest give you.
- Write tests that catch bugs: Your tests are graded against real buggy implementations.
- Test-driven bug fixing: Reproduce the bug in a failing test, then make it green.
- Mocks, spies & dependency injection: Test network code without a network, and prove retries work.
- Table-driven edge-case tests: One runner, many cases: boundaries, zero, and bad input.
- Prompt: get AI to write real tests: Ask for tests that catch bugs, not tests that pass.
- Fix the AI: tests that test nothing: Every AI test is green. None of them would catch a bug.
- CI with GitHub Actions: Run your tests on every push and block broken merges.
- Feature flags & percentage rollouts: Ship code dark, roll out to 5% of users, and keep a kill switch.
- Logging & monitoring basics: Know something broke before your users tell you.
- Safe rollouts & rollback: Canaries, blue-green, safe migrations and rolling back first.
- Boss: Build a release gate: A test runner plus a canary judge that decides promote or rollback.
Part of: AI Web Developer career path, Backend & Cloud Engineer career path