Chapter 4. The four pillars of a good unit test
This chapter covers
- Exploring dichotomies between aspects of a good unit test
- Defining an ideal test
- Understanding the Test Pyramid
- Using black-box and white-box testing
Now we are getting to the heart of the matter. In chapter 1, you saw the properties of a good unit test suite:
- It is integrated into the development cycle. You only get value from tests that you actively use; there’s no point in writing them otherwise.
- It targets only the most important parts of your code base. Not all production code deserves equal attention. It’s important to differentiate the heart of the application (its domain model) from everything else. This topic is tackled in chapter 7.
- It provides maximum value with ...
Get Unit 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.