Testing legacy code when you dislike tests (and legacy code)
summary
Defines legacy code as code deployed to production without tests and argues testing must target observable application behavior not implementation details. Shows a concrete migration: replacing Resque/Redis with Kafka by running both systems in parallel behind a feature flag, verifying payloads at the subsystem seam. Recommends integration tests for high value checks, functional/unit tests for edge cases, pull record counts from the data layer, and use the seam model and Capybara DSL to keep tests resilient.
AI-written summary · about
chapters (8)
- 0:00Start
- 7:17Risk of the unknown
- 7:42Cost of change
- 10:13Maintaining legacy code
- 10:37Optimize inputs
- 11:23Testing legacy code
- 24:24Integration test value
- 31:34Unit test value
related talks
36mUsing Tests as a Tool to Wrangle Legacy Projects
39mDown The Rabbit Hole: An Adventure in Legacy Code
23mLoving Legacy Code
36mWorking Compassionately with Legacy Code
28mHarry Potter and the Legacy Codebase
40mTesting Legacy Code: Safe Refactoring
54mTesting in Legacy: From Rags to Riches
45mTesting Legacy Code - What To Do When It Seems Untestable
