com.ibm.team.fvt.tests.scenario
Class Scenario
java.lang.Object
junit.framework.TestSuite
com.ibm.team.fvt.tests.scenario.Scenario
- All Implemented Interfaces:
- junit.framework.Test
public class Scenario
- extends junit.framework.TestSuite
A test suite representing a scenario.
Extends TestSuite
to add several functionalities:
- Filters test cases when
ScenarioRun.RUN_TEST_ID
parameter
is set
- Propagate scenario run information to each scenario step
- Invoke
ScenarioStep.setUpSuite()
method before running
the first test case of a scenario step
- Invoke
ScenarioStep.tearDownSuite()
method after having run
the last test case of a scenario step
- Manages the scenario execution when a failure occurs.
By default the scenario will always stop as soon as a failure occurs. That allow
to resume it more safely. If this behavior needs to be changed, then
stopOnFailure
has to be set to true
using
Scenario(Class, boolean)
constructor.
Constructor Summary |
Scenario()
|
Scenario(java.lang.Class<? extends junit.framework.TestCase> clazz)
|
Scenario(java.lang.Class<? extends junit.framework.TestCase> clazz,
boolean stopOnFailure)
|
Method Summary |
void |
addTestSuite(java.lang.Class<? extends junit.framework.TestCase> testClass)
|
void |
runTest(junit.framework.Test test,
junit.framework.TestResult result)
Overrides super implementation in order to:
Propagate the scenario run information just after having built the JUnit tests
hierarchy
Call the ScenarioStep.setUpSuite() method at the beginning of
the test suite run
Manage the execution continuation in case of test failure
Call the ScenarioStep.tearDownSuite() method at the end of
the test suite run
Ends properly the scenario run (see ScenarioRun.tearDown() )
|
Methods inherited from class junit.framework.TestSuite |
addTest, countTestCases, createTest, getName, getTestConstructor, run, setName, testAt, testCount, tests, toString, warning |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Scenario
public Scenario()
Scenario
public Scenario(java.lang.Class<? extends junit.framework.TestCase> clazz)
Scenario
public Scenario(java.lang.Class<? extends junit.framework.TestCase> clazz,
boolean stopOnFailure)
addTestSuite
public void addTestSuite(java.lang.Class<? extends junit.framework.TestCase> testClass)
- Overrides:
addTestSuite
in class junit.framework.TestSuite
runTest
public void runTest(junit.framework.Test test,
junit.framework.TestResult result)
- Overrides super implementation in order to:
- Propagate the scenario run information just after having built the JUnit tests
hierarchy
- Call the
ScenarioStep.setUpSuite()
method at the beginning of
the test suite run
- Manage the execution continuation in case of test failure
- Call the
ScenarioStep.tearDownSuite()
method at the end of
the test suite run
- Ends properly the scenario run (see
ScenarioRun.tearDown()
)
- Overrides:
runTest
in class junit.framework.TestSuite