O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required