Chapter 3. Where Do I Start?

Knowing how to approach a problem and having a plan of attack simplifies and increases the effectiveness of testing. In this sense, test-driven development provides an easier framework in which to test because your tests are directed by what you want to implement next. Untested existing code presents a more formidable challenge because there are so many options for how to start.

This chapter provides guidance in the form of a reasoned approach to testing. The strategy is not radical or new, but it establishes a context in which the techniques in the remainder of the book can be applied. It hopefully clears away some of the questions about testing strategy so that testing techniques can be used effectively.

This chapter—in ...

Get Quality Code: Software Testing Principles, Practices, and Patterns 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.