|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectnet.thucydides.core.steps.StepEventBus
public class StepEventBus
An event bus for Step-related notifications. Use this to integrate Thucydides listeners with testing tools. You create a listener (e.g. an instance of BaseStepListener, or your own), register it using 'registerListener', and then implement the various methods (testStarted(), stepStarted()). Thucydides will call these events on your listener as they occur. You can register a new Thucydides listener by implementing the StepListener interface and placing your class in the classpath. Thucydides will automatically detect the listener and add it to the registered listeners. It will load custom listeners automatically when a test starts for the first time.
| Constructor Summary | |
|---|---|
StepEventBus(ScreenshotProcessor screenshotProcessor)
|
|
| Method Summary | |
|---|---|
boolean |
areStepsRunning()
|
boolean |
aStepInTheCurrentTestHasFailed()
|
void |
clear()
|
boolean |
currentTestIsPending()
|
void |
dropAllListeners()
|
void |
dropListener(StepListener stepListener)
|
protected List<StepListener> |
getAllListeners()
|
static StepEventBus |
getEventBus()
The event bus used to inform listening classes about when tests and test steps start and finish. |
boolean |
isCurrentTestDataDriven()
|
void |
lastStepFailed(StepFailure failure)
|
void |
notifyScreenChange()
|
void |
reenableWebdriverCalls()
|
StepEventBus |
registerListener(StepListener listener)
Register a listener to receive notification at different points during a test's execution. |
void |
skippedStepStarted(ExecutedStepDescription executedStepDescription)
Record a step that is not scheduled to be executed (e.g. |
void |
stepFailed(StepFailure failure)
|
void |
stepFinished()
|
void |
stepIgnored()
|
void |
stepPending()
|
void |
stepPending(String message)
|
void |
stepStarted(ExecutedStepDescription executedStepDescription)
Start the execution of a test step. |
void |
temporarilySuspendWebdriverCalls()
|
void |
testFailed(Throwable cause)
The test failed, but not during the execution of a step. |
void |
testFinished()
|
void |
testFinished(TestOutcome result)
|
void |
testIgnored()
|
void |
testPending()
Mark the current test method as pending. |
void |
testStarted(String testName)
|
void |
testStarted(String newTestName,
Class<?> testClass)
|
void |
testStarted(String newTestName,
Story story)
|
void |
testSuiteFinished()
|
void |
testSuiteStarted(Class<?> testClass)
|
void |
testSuiteStarted(Story story)
|
boolean |
webdriverCallsAreSuspended()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject public StepEventBus(ScreenshotProcessor screenshotProcessor)
| Method Detail |
|---|
public static StepEventBus getEventBus()
public StepEventBus registerListener(StepListener listener)
public void testStarted(String testName)
public void testStarted(String newTestName,
Story story)
public void testStarted(String newTestName,
Class<?> testClass)
protected List<StepListener> getAllListeners()
public void testSuiteStarted(Class<?> testClass)
public void testSuiteStarted(Story story)
public void clear()
public void testFinished()
public void testFinished(TestOutcome result)
public boolean aStepInTheCurrentTestHasFailed()
public boolean isCurrentTestDataDriven()
public void stepStarted(ExecutedStepDescription executedStepDescription)
public void skippedStepStarted(ExecutedStepDescription executedStepDescription)
public void stepFinished()
public void stepFailed(StepFailure failure)
public void lastStepFailed(StepFailure failure)
public void stepIgnored()
public void stepPending()
public void stepPending(String message)
public void dropListener(StepListener stepListener)
public void dropAllListeners()
public boolean webdriverCallsAreSuspended()
public void reenableWebdriverCalls()
public void temporarilySuspendWebdriverCalls()
public void testFailed(Throwable cause)
cause - the underlying cause of the failure.public void testPending()
public boolean currentTestIsPending()
public void testIgnored()
public boolean areStepsRunning()
public void notifyScreenChange()
public void testSuiteFinished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||