|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.team.fvt.tests.scenario.ScenarioExecution
public abstract class ScenarioExecution
Manage scenario execution.
This class is responsible to initialize and store the configuration and the data.
It also controls the scenario behavior when failure occurs using following arguments:
STOP_ON_FAILURE_ID
: flag to tell whether the scenario can
continue after a test failure or should stop immediately. By default, the
execution will continue after a failure, but setting this argument to true
will make it stop at the first failure.FAILURES_THRESHOLD_ID
: Number of tolerated failure coming
from selenium WebDriver API (ie. when a WebDriverException
is raised)
when running the entire scenario.ALERTS_THRESHOLD_ID
: Number of tolerated alerts when running
the entire scenario.TIMEOUTS_THRESHOLD_ID
: Number of tolerated timeouts failure
when running the entire scenario.
Another important thing done by this class is to store the current page
to be able to pass it from test to test inside a scenario step and also from step
to step inside the scenario. That allow easy transition between tests when
a test ends on the same page where the following one starts.
Constructor Summary | |
---|---|
ScenarioExecution()
|
Method Summary | |
---|---|
void |
addMandatoryTests(java.util.List<org.junit.runners.model.FrameworkMethod> tests)
Add a list of mandatory tests. |
void |
finish()
Ends the scenario execution. |
WebBrowser |
getBrowser()
Return the browser used to run the scenario |
Config |
getConfig()
Return the scenario configuration to use during the run. |
ScenarioData |
getData()
Return the scenario data to use during the run. |
WebPage |
getPage()
Return the current page. |
Topology |
getTopology()
Return the scenario topology used during the run. |
boolean |
hasException()
|
boolean |
isSingleStep()
|
void |
runTest(org.junit.runners.model.Statement statement,
org.junit.runners.model.FrameworkMethod frameworkMethod)
Run the current test and take specific actions when some typical exception or error occurs (e.g. |
void |
setPage(WebPage page)
Set the current scenario page. |
void |
setSingleStep(boolean singleStep)
|
boolean |
shouldStop()
|
void |
takeSnapshotFailure()
Takes a failure snapshot. |
void |
takeSnapshotInfo(java.lang.String title)
Takes a graph snapshot. |
void |
takeSnapshotWarning()
Takes a warning snapshot. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScenarioExecution()
Method Detail |
---|
public void addMandatoryTests(java.util.List<org.junit.runners.model.FrameworkMethod> tests)
tests
- The mandatory tests to addpublic void finish()
public WebBrowser getBrowser()
WebBrowser
.public Config getConfig()
Config
.public ScenarioData getData()
ScenarioData
.public WebPage getPage()
WebPage
.public Topology getTopology()
Topology
.public boolean hasException()
public boolean isSingleStep()
public void runTest(org.junit.runners.model.Statement statement, org.junit.runners.model.FrameworkMethod frameworkMethod) throws java.lang.Throwable
Design Needs finalization
java.lang.Throwable
public void setPage(WebPage page)
public void setSingleStep(boolean singleStep)
singleStep
- the singleStep to setpublic boolean shouldStop()
public void takeSnapshotFailure()
public void takeSnapshotInfo(java.lang.String title)
title
- The title to display in the console when taking the snapshotpublic void takeSnapshotWarning()
public java.lang.String toString()
Return the current step.test names
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |