We are using Categories to aid in separating UnitTests, IntegrationTests, etc.
A UnitTest is: /** * JUnit Test Category that specifies a test with very narrow and well defined * scope. Any complex dependencies and interactions are stubbed or mocked. * * <p><ul>A {@code UnitTest} should <bold>not<bold> do any of the following: * <li>communicate with a database * <li>communicate across the network * <li>access the file system * <li>prevent the running of other unit tests in parallel * <li>require anything special in the environment (such as editing config files or running an external process) * </ul> * * @see <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=126923">A Set of Unit Testing Rules by Michael Feathers</a> */ An IntegrationTest is: /** * JUnit Test Category that specifies a test involving inter-operation of * components or subsystems. */ [1] http://www.artima.com/weblogs/viewpost.jsp?thread=126923 -Kirk