Legacy code is basically code that is difficult to work with but we have to change. One of the reasons its difficult to work with is probably that the design is poor and it lacks both modularity and automated tests. Adding tests to this kind of code is often a chicken-and-egg problem. You can’t add tests until the code is redesigned to be more modular, and you aren’t confident to change the code to make it more modular until you have some tests.
Approval testing is a great technique for this situation and many of these learning hours are about it.
The ‘Legacy Code’ theme is closely related to both Refactoring and Test Design, but I tend to put it in its own category since there are techniques for handling legacy code that you wouldn’t need in other situations.
- Approval Testing Intro
- Intro to Approvals
- Strangler Fig Pattern
- Using coverage when adding tests to existing code
- Approval Testing Combinations
- Design for Approval Testing
- Test maintenance
- Combination Approvals needs a Pure Function
- Demo of Approvals with Coverage and Mutation testing
- Text-Based Testing
- Text-based Approval Tests for Yatzy