Chapter 4. Design and Testability

Much has been written about software design. Our body of knowledge and vocabulary about design concerns have continually evolved over the last several decades. We have applied structured design, object-oriented design, and aspect-oriented design to our software. We speak of design patterns and pattern languages as catalogues and guiding principles. Meszaros [xTP] compiles patterns about the testing of software.

In all of this, very little has been said about designing our software to be testable. Testability often comes as an afterthought or we sacrifice testing for the purity of our design. In fact, many of our “good design” principles inhibit testability. This chapter will examine some ways in which this occurs. ...

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.