Class AdvancedRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.eclipse.jetty.toolchain.test.AdvancedRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class AdvancedRunner extends org.junit.runners.BlockJUnit4ClassRunner
Tiered Junit 4 Test Runner.

Supports @Slow and @Stress supplemental annotation on test methods to allow for filtering of what class of test to execute.

   @Test
   @Slow
   public void testLotsOfStuff() {
      ... do something long and complicated ...
   }
   
   @Test
   @Stress("requirements to satisfy this test")
   public void testUsingLotsOfResources() {
      ... do something that uses lots of resources ...
   }
   
   @Test
   public void testSimple() {
      ... do something that happens quickly ...
   }
To enable / disable the various tests, you have some System properties you can utilize.
-Dtest.fast
If present, this will disable @Slow
-Dtest.slow=(boolean)
Enable or disable the @Slow tests.
Default: true
-Dtest.stress=(boolean)
Enable or disable the @Stress tests.
Default: false
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
     

    Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

    collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation

    Methods inherited from class org.junit.runner.Runner

    testCount

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AdvancedRunner

      public AdvancedRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • runChild

      protected void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
      Overrides:
      runChild in class org.junit.runners.BlockJUnit4ClassRunner