Module 2: Implementation & Testing: Worked Examples
Example 1: Ship the Walking Skeleton
Build one request from client through API, domain logic, datastore, and response, deployed through CI. Wrong attempt: perfect each layer independently for two weeks. The walking skeleton exposes integration and deployment risks while change is still cheap.
Example 2: Test an Invariant at the Right Boundary
Unit-test domain state transitions, integration-test transaction/constraint behavior, contract-test service or queue boundaries, and use one end-to-end happy path plus a critical failure path. Duplicating the same assertion at every layer adds cost without new confidence.
Example 3: Regression-First Repair
Reproduce a duplicate-payment defect with the smallest failing test, verify it fails for the expected reason, implement idempotency, then retain the test. Record symptom, root cause, fix, and why adjacent paths are safe.
Completion Standard
- Show a deployed vertical slice, risk-based test strategy, regression history, CI gates, and a debt ledger with owners and consequences.