8
Testing Architecture Elements
In many projects I’ve witnessed, especially projects that have been around for a while and have rotated in and out many developers over time, automated testing is a mystery. Everyone writes tests as they see fit because it’s required by some dusty rule documented in a wiki, but no one can answer targeted questions about a team’s testing strategy.
This chapter provides a testing strategy for a Hexagonal Architecture. For each element of our architecture, we’ll discuss the type of test to cover it.
The test pyramid
Let’s start the discussion about testing along the lines of the test pyramid1 in Figure 8.1, which is a metaphor that helps us to decide on how many tests of which type we should aim for.
1 The test ...
Get Get Your Hands Dirty on Clean Architecture - Second Edition 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.