Use Test Categorization for Agile Builds
Do you categorize tests? Grouping developer tests into three categories (unit tests, component tests, and system tests) ensures end-to-end system soundness which can make all the difference in reducing software build durations.
The tenth article, “Use Test Categorization for Agile Builds”, in the popular IBM developerWorks series, “In pursuit of code quality” demonstrates how to automatically sort and run these categories at varying frequencies within a Continuous Integration strategy.
The basic idea of test categorization is to segregate tests based on how long they take to run, and run the fast ones more often than the slow ones. This gives the benefit that you actually run the fast ones more often, i.e., you don’t not run the fast ones because they are lumped in with the slow ones, and the whole bundle of tests is taking too long. Categorizing tests is easy with TestNG, using annotations. With JUnit it can be done with naming conventions or directory partitioning.
In related news - check out the podcast on Test Categorization!
