Test Points

We need test points to confirm our understanding of what the code is doing. Sometimes they are easier to get to than others.


Function calls form seams between different parts of the code. These seams make the best test points. Seams let us see and influence what the code under test is doing.

Michael defines a seam as follows: “A seam is a place where you can alter the behavior in your program without editing in that place.”

Seams are where we can employ test doubles to spy on data passed to collaborators, allowing the test case to make sure the code under test is giving its collaborator the right instructions. Function call seams are also where the test double can provide indirect inputs to the code under tests through ...

Get Test Driven Development for Embedded C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.