My "Unit Test" Aint Your "Unit Test"

| by Mike Bria Follow 0 Followers on Jun 25, 2008. Estimated reading time: 2 minutes |
Mike Hill, well-known XP contributor, came forth to make a few interesting assertions about the misunderstanding often surrounding how a TDD "unit test" differs from the "unit test" of traditional lore. In particularly, Mike describes how he and the others at Industrial Logic have been able to avoid much of the confusion when teaching by using the term microtest to describe TDD's unit tests.
We call XP's unit tests "microtests", at least in part to sidestep the tedious and error-prone business of constantly explaining how XP's unit tests are quite unlike the testing world's unit tests.
The thread was initiated by Ben Hall's question asking why it appears that the testers (non-programmer ones that is) in his view seem not to have quite the prolific community as other disciplines: the community, where are all of the testers? Developers are easy to find, they have massive conferences (PDC, TechEd) down to small user groups (NxtGenUG), I have been a member of NxtGenUG for almost 2 years since they first started in Coventry and I attended TechEd Europe but where are the testers at these types of events? Or am I just missing something?

I know recruiters have been asking this question for a while, but from a community point of view - where are all the testers? Where are the conversations happening? There must be a conversation happening about how we can improve software testing, how testers fit into the project structure and take advantage of new development technologies.
Interestingly enough, initial response to Ben's question summarized in part as "the communities are there, but separate, in large part due simply to avoid miscommunication through term overlap". Thus prompting the great discussion about the possible benefits of a fresh term such as "microtesting" to capture the TDD way of programmer "unit testing".

Hill led this discussion, primarily asserting the positive outcomes he has had with using "microtesting" to help new XP teams understand how a unit test is focused on a significantly smaller "unit" than that often thought of by non-XPer's. Mike highlights not only this difference, but goes on to note how in fact the actual purpose of TDD and microtesting differs from that of traditional testing:
We take the position that the real benefit of extensive microtest-driven development isn't higher quality at all. Higher quality is a side effect of TDD. Rather, the benefit and real purpose of TDD as we teach it is sheer productivity: more function faster.
Many responses show support for the idea's brought forth by Mike. Among them, XP big name Ron Jeffries:
I very much agree that this is the real benefit, and I admire [your assertiveness] in coming right out and saying it.
Additionally interesting and useful about the thread are the various viewpoints and stances presented regarding the pro's and cons of introducing a new term like 'microtesting', as well as a highly informative list of what a microtest really is.

Take a few moments to check out the thread for yourself here, and let readers know what your take on the subject may be.

For more on 'microtesting', check out Industrial Logic's "Greatest Hit" eLearning albums for web-based training on this subject and many others.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Where's the confusion? by Ole Friis

I've never been aware that a confusion exists. What is described in this article as microtests is exactly what I understand as unit tests.

Perhaps someone will be kind and tell me what other people understand unit tests as being?

Re: Where's the confusion? by Mr Magoo

I guess that is a good example of the confusion then!


"To write test cases for every non-trivial function or method in the module so that each test case is separate from the others if possible."

The fact that "developer unit tests" are generically called "unit tests" as the default definition (from a devs point of view of course) does not change the actual meaning.

Devs tend to get frustrated with people "confusing the issue" by calling other things unit tests when, in fact, they are part of the confusion.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you