Chapter 12. Use Existing Seams
Michael Feathers introduced the concept of seams [WEwLC] as a framework for bringing code under test. A seam in our code gives us the opportunity to take control of that code and exercise it in a testing context. Any place that we can execute, override, inject, or control the code could be a seam. Seams are all over the place. Sometimes, they are so obvious that we do not even think of them as seams. Other times, they are subtle or arcane and we miss them. And sometimes, we introduce them in order to be able to exert the control we need for testing.
Now that we have seen numerous techniques for bringing code under test, let’s step back briefly and look at the big picture. This chapter roughly outlines an ordering ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access