Gerard Meszaros is working on a book to capture patterns for using the various Xunit frameworks. One of the awkward things he's run into is the various names for stubs, mocks, fakes, dummies, and other things that people use to stub out parts of a system for testing. To deal with this he's come up with his own vocabulary which I think is worth spreading further.

The generic term he uses is a Test Double (think stunt double). Test Double is a generic term for any case where you replace a production object for testing purposes. There are various kinds of double that Gerard lists:

Further Reading

I expand on the use of Mocks, Doubles and the like in Mocks Aren't Stubs

if you found this article useful, please share it. I appreciate the feedback and encouragement

Find similar articles at the tag