Chapter 2. In search of good

 

In this chapter
  • What makes a test “good”?
  • Testing relevant behavior
  • The importance of reliable tests

 

We’re on a journey of learning about good tests. We want to learn to identify good tests, write good tests, and improve not-so-good tests so they become good tests—or at least closer to being good tests. The question is, What makes a test “good”? What are the magic ingredients? There are several aspects to consider, including:

  • The test code’s readability and maintainability
  • How the code is organized both within the project and within a given source file
  • What kinds of things a test is checking for
  • How reliable and repeatable a test is
  • How a test makes use of test doubles

We’ll be taking ...

Get Effective Unit Testing 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.