Package eu.bandm.tools.test
Class JUnit4Runner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
eu.bandm.tools.test.JUnit4Runner
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Sortable
public class JUnit4Runner
extends org.junit.runners.BlockJUnit4ClassRunner
Class which filters interactive, future, and currently-under-development
tests.
Can be activated by annotating some parent class of a test class
with
@RunWith(eu.bandm.tools.test.JUnit4Runner.class)
.
Overrides the given class in junit-4.12. Is written be analyzing the source in junit-4.12-sources.jar, as downloaded from https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12-sources.jar.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.junit.runners.model.FrameworkMethod>
Override the framework method to handle our additional annotations.protected void
validateInstanceMethods
(List<Throwable> errors) Remove the error message in case that no single test method has been found in a particular test class.Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
Methods inherited from class org.junit.runner.Runner
testCount
-
Field Details
-
PROPERTY_INTERACTIVE_TESTS
- See Also:
-
-
Constructor Details
-
JUnit4Runner
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
computeTestMethods
Override the framework method to handle our additional annotations. If at least one annotation = "{code @Work}"
then run only those
else consider all with "Test
" and ignore all with "Tocome
". Ignore all with "interactice
" unless system propertiePROPERTY_INTERACTIVE_TESTS
is set.ATTENTION: Is not clear and not tested how this interacts with sub-classes of tests, "" and "" and other more complex features of the original software.
- Overrides:
computeTestMethods
in classorg.junit.runners.BlockJUnit4ClassRunner
-
validateInstanceMethods
Remove the error message in case that no single test method has been found in a particular test class. The super-class method is marked Deprecated, but nevertheless called by the re-engineered code.- Overrides:
validateInstanceMethods
in classorg.junit.runners.BlockJUnit4ClassRunner
-