Chapter 9. Dependencies

Developers who are new to unit testing and have just grasped its mere basics soon hit a barrier. From their perspective, the systems they encounter bear no resemblance to the examples in an introductory text or online tutorial on unit testing or test-driven development. In my experience, this can be very demoralizing and lead to conclusions like: “Our system can’t be tested” or “Unit testing/test-driven development only works in green field projects.” There are numerous reasons for such beliefs, some being a complex or botched architecture, inconsistent design, or simply code written with everything but testability in mind. However, in the majority of cases, the problem is much simpler and is spelled dependencies. Different ...

Get Developer Testing: Building Quality into Software 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.