org.junitext
Annotation Type Category


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Category

Test cases can be assigned to a Category, e.g. database tests, long running tests, etc.

Each test case annotated with @Category can be used when running tests in these ways:

Example how to sort via category:

 JUnitCore core = new JUnitCore();
 Request request = Request.aClass(MyTest.class);
 Result result = core.run(request.sortWith(new CategorySorter()));
 

Example how to filter via category:

 JUnitCore core = new JUnitCore();
 Request request = Request.aClass(MyTest.class);
 Result result = core.run(request.filterWith(new CategoryFilter("db tests")));
 

See Also:
CategorySorter, CategoryFilter

Required Element Summary
 java.lang.String value
          The category name.
 

Element Detail

value

public abstract java.lang.String value
The category name.