Andrew Glover examines the concept of test categories and demonstrates how to incorporate TestNG’s groups annotation in his featured article “Test Categorization Techniques with TestNG” on Dev2Dev™.

TestNG, an annotation-based testing framework, draws on some of the shortcomings of JUnit. Glover touched on this subject in his article, “JUnit vs. TestNG”; part of his popular “In pursuit of code quality” series on IBM developerWorks.

Implementing test categorization with TestNG is quite easy. With TestNG’s group annotation, logically dividing tests by category is as easy as applying the proper group annotation to a desired test. Running a particular category then is a matter of passing in the corresponding group name to a test runner, such as Ant.

This is a useful article worth reading!