My "Unit Test" Aint Your "Unit Test"
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:
...in 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?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".
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.
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.
Where's the confusion?
Perhaps someone will be kind and tell me what other people understand unit tests as being?
Re: Where's the confusion?
"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.
Anatole Tresch Mar 03, 2015