Chapter 13: I Need to Make a Change, but I Don’t Know What Tests to Write

When people talk about testing, they are usually referring to tests that they use to find bugs. Often these tests are manual tests. Writing automated tests to find bugs in legacy code often doesn’t feel as efficient as just trying out the code. If you have some way of exercising legacy code manually, you can usually find bugs very quickly. The downside is that you have to do that manual work over and over again whenever you change the code. And, frankly, people just don’t do that. Nearly every team I’ve worked with that depended on manual testing for its changes has ended far behind. The confidence of the team isn’t what it could be.

No, finding bugs in legacy code usually ...

Get Working Effectively with Legacy Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.