com.ibm.team.fvt.tests.scenario
Class ScenarioRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runner.Runner>
org.junit.runners.Suite
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:
FIRST_STEP
: step from which the scenario has to start instead
of default one.
LAST_STEP
: step at which the scenario has to end instead
of default one.
FIRST_TEST
: test of the starting step from which the scenario
has to start instead of default one.
LAST_TEST
: test of the starting step at which the scenario
has to end instead of default one.
STEPS
: steps the scenario has to run
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 |
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
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:
- Propagate the scenario execution object to steps and tests
- Perform some needed stuff at the end of the scenario execution
- Overrides:
run
in class org.junit.runners.ParentRunner<org.junit.runner.Runner>