Chapter 18. Designing and Refactoring Tests to Communicate Ideas

We’ve seen the development of many Fit tests in the past few chapters. Now it’s time to generalize from those examples and to consider some principles and practices to help with test design.

Tests help us think and to communicate about what’s needed, so it’s worth putting effort into making them work well. They also help to check that the system responds as we expect.

18.1 Principles of Test Design

In this chapter, we draw on three main principles of test design.

1.   Tests are for communicating ideas.

2.   Tests will change along with the business and the needs for the software.

3.   Tests are automated to quickly show when we’re done and to avoid errors from being introduced ...

Get Fit for Developing Software: Framework for Integrated Tests 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.