CHAPTER 14 ■ GOOD (AND BAD) PRACTICE
322
you performed during development. You’ll have probably forgotten them all, anyhow, unless you kept
them in some way (perhaps commented out at the bottom of your class file as I sometimes do). Small
changes, though, have a way of causing large unintended consequences—consequences that might have
been caught had you thought to put a test harness in place.
A test harness is a set of automated tests that can be applied to your system as a whole or to its
individual classes. Well deployed, a test harness helps you to prevent bugs from occurring and from
recurring. A single change may cause a cascade of errors, and the test harness can help you to locate and
eliminate these. This means you can make changes ...