7 Designing for testability
This chapter covers
- Designing testable code at the architectural, design, and implementation levels
- Understanding the Hexagonal Architecture, dependency injection, observability, and controllability
- Avoiding testability pitfalls
I usually say that every software system can be tested. However, some systems are more testable than others. Imagine that for a single test case, we need to set up three different web services, create five different files in different folders, and put the database in a specific state. After all that, we exercise the feature under test and, to assert the correct behavior, again need to see if the three web services were invoked, the five files were consumed correctly, and the database is now ...
Get Effective Software 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.