org.junit.runner.manipulation.Filterable
, org.junit.runner.manipulation.Sortable
public class PMDTestRunner
extends org.junit.runner.Runner
implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
JUnit4
and our custom RuleTestRunner
.
It allows to selectively execute single test cases (it is Filterable
).
Note: Since we actually run two runners one after another, the static BeforeClass
and methods will be executed twice and the test class will be instantiated twice, too.
In order to use it, you'll need to subclass SimpleAggregatorTst
and
annotate your test class with RunWith:
@RunWith(PMDTestRunner.class) public class MyRuleSetTest extends SimpleAggregatorTst { ... }
Constructor | Description |
---|---|
PMDTestRunner(java.lang.Class<? extends SimpleAggregatorTst> klass) |
Modifier and Type | Method | Description |
---|---|---|
void |
filter(org.junit.runner.manipulation.Filter filter) |
|
org.junit.runner.Description |
getDescription() |
|
void |
run(org.junit.runner.notification.RunNotifier notifier) |
|
void |
sort(org.junit.runner.manipulation.Sorter sorter) |
public PMDTestRunner(java.lang.Class<? extends SimpleAggregatorTst> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public void filter(org.junit.runner.manipulation.Filter filter) throws org.junit.runner.manipulation.NoTestsRemainException
filter
in interface org.junit.runner.manipulation.Filterable
org.junit.runner.manipulation.NoTestsRemainException
public org.junit.runner.Description getDescription()
getDescription
in class org.junit.runner.Runner
public void run(org.junit.runner.notification.RunNotifier notifier)
run
in class org.junit.runner.Runner
public void sort(org.junit.runner.manipulation.Sorter sorter)
sort
in interface org.junit.runner.manipulation.Sortable
Copyright © 2002–2018 PMD. All rights reserved.