Automated unit testing is the agile software development equivalent of “in-process inspection” in Lean Production systems. xUnit is the generic name given to the family of tools/frameworks used by developers when developing automated unit tests. The community has now had enough experience with using XUnit to start cataloging “best practices” and “not so best practices” as patterns and smells. This tutorial introduces a number of these “test smells”, describes their root causes, and suggests possible solutions expressed in the form of patterns.
XUnit Test Patterns and Smells will be of most interest to developers, development leads, coaches and architects working in a Test-First or Test-Driven Development environment. While some exposure and prior usage of one of the members of the XUnit family of test automation frameworks (e.g. JUnit, VbUnit, RUnit, CppUnit, etc.) is beneficial, even people new to automated testing using XUnit will get benefits. It is not, however, an introduction to the use of XUnit in general or any one member of the family in particular.