com.ibm.team.fvt.tests.scenario
Class ScenarioRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runner.Runner>
          extended by org.junit.runners.Suite
              extended by com.ibm.team.fvt.tests.scenario.ScenarioRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public abstract class ScenarioRunner
extends org.junit.runners.Suite

Manage scenario JUnit run.

This specific JUnit 4 runner allow to tightly control the scenario content hierarchy by specifying the following parameters:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.junit.runners.Suite
org.junit.runners.Suite.SuiteClasses
 
Constructor Summary
ScenarioRunner(java.lang.Class<?> klass, org.junit.runners.model.RunnerBuilder builder)
           
 
Method Summary
 void filter(org.junit.runner.manipulation.Filter filter)
          We need to override this method when using JUnit 4.8.1 because the filter does not seem not to filter anything...
 ScenarioExecution getScenarioExecution()
           
 void run(org.junit.runner.notification.RunNotifier notifier)
          
 
Methods inherited from class org.junit.runners.Suite
emptySuite
 
Methods inherited from class org.junit.runners.ParentRunner
getDescription, getTestClass, setScheduler, sort
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScenarioRunner

public ScenarioRunner(java.lang.Class<?> klass,
                      org.junit.runners.model.RunnerBuilder builder)
               throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

filter

public void filter(org.junit.runner.manipulation.Filter filter)
            throws org.junit.runner.manipulation.NoTestsRemainException
We need to override this method when using JUnit 4.8.1 because the filter does not seem not to filter anything... :-(

TODO Remove this part when moving to Eclipse 3.8.1 target platform which includes JUnit 4.10 where the filter works well

Specified by:
filter in interface org.junit.runner.manipulation.Filterable
Overrides:
filter in class org.junit.runners.ParentRunner<org.junit.runner.Runner>
Throws:
org.junit.runner.manipulation.NoTestsRemainException

getScenarioExecution

public ScenarioExecution getScenarioExecution()
Returns:
the scenarioExecution

run

public void run(org.junit.runner.notification.RunNotifier notifier)

Override basic JUnit 4 implementation to:

  1. Propagate the scenario execution object to steps and tests
  2. Perform some needed stuff at the end of the scenario execution
    1. Overrides:
      run in class org.junit.runners.ParentRunner<org.junit.runner.Runner>