|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@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")));
CategorySorter,
CategoryFilter| Required Element Summary | |
|---|---|
java.lang.String |
value
The category name. |
| Element Detail |
|---|
public abstract java.lang.String value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||