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
@PropertyDependency("eu.bandm.tools.test.interactiveTests")
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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected List<org.junit.runners.model.FrameworkMethod> Override the framework method to handle our additional annotations.protected voidvalidateInstanceMethods(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.BlockJUnit4ClassRunnercollectInitializationErrors, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunnerchildrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClassesMethods inherited from class org.junit.runner.RunnertestCount
- 
Field Details- 
PROPERTY_INTERACTIVE_TESTS- See Also:
 
 
- 
- 
Constructor Details- 
JUnit4Runner- Throws:
- org.junit.runners.model.InitializationError
 
 
- 
- 
Method Details- 
computeTestMethodsOverride 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_TESTSis set.ATTENTION: Is not clear and not tested how this interacts with sub-classes of tests, " @Before" and "@After" and other more complex features of the original software.- Overrides:
- computeTestMethodsin class- org.junit.runners.BlockJUnit4ClassRunner
 
- 
validateInstanceMethodsRemove 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:
- validateInstanceMethodsin class- org.junit.runners.BlockJUnit4ClassRunner
 
 
-