A good testing strategy builds confidence through the accumulation of proof and increasing clarity. Within a company this might mean that some criteria for the execution of a business strategy have been satisfied, allowing for the release of a new product. The developers within a project team gain the pleasure of an automated judge that confirms or denies whether changes committed to a codebase are sound. With a good testing framework refactoring loses its danger: the "if you break it you own it" caveat that once placed negative pressure on developers with new ideas is no longer as ominous. Given a good version control system and test/release process, any breaking change can be rolled back without negative impact, freeing curiosity and experimentation.
Three common types of tests are: unit tests, functional tests, and integration tests. While our goal in this chapter is not to put forward a general theory about how to test applications, it will be useful to briefly...