O'Reilly logo

Effective Unit Testing: A guide for Java Developers by Lasse Koskela

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required