Adding New Behavior
When you think about it, the process of adding new behavior to a system isn’t so different from fixing a bug. The overall goal is to change some aspect of how the system behaves, without breaking anything else.
Just as with bug fixing, we can use characterization tests to pin down the surrounding behavior of the system to make sure it isn’t dislodged by our work. Characterization tests can also be useful before that, while the new feature is first being considered. You can use them to help understand how much work is involved in the new feature by clarifying exactly what the system currently does.
Here’s our approach for adding new behavior to a legacy system:
-
Examine the new feature. If needed, write a few characterization ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access