How do you group your test cases in JUNIT / Run your test suite based on conditions or filters
In an agile project you want a quicker build process, therefore it is good to automate and categorize which will result in : Faster feedback. A nice way to do this is to be able to classify your tests into different categories. For example, this can make it easier to distinguish between faster running tests, and slower tests such as integration, performance, load or acceptance tests. This feature exists in TestNG, but, until recently, not in JUnit.
From a given set of test classes, the Categories runner runs only the classes and methods that are annotated with either the category given with the @IncludeCategory annotation, or a subtype of that category. Either classes or interfaces can be used as categories. You can also exclude categories by using the @ExcludeCategory annotation