public class StepEventBus
extends java.lang.Object
Constructor and Description |
---|
StepEventBus(ScreenshotProcessor screenshotProcessor,
EnvironmentVariables environmentVariables) |
Modifier and Type | Method and Description |
---|---|
void |
addDescriptionToCurrentTest(java.lang.String description) |
void |
addIssuesToCurrentStory(java.util.List<java.lang.String> issues) |
void |
addIssuesToCurrentTest(java.util.List<java.lang.String> issues) |
void |
addNewExamplesFrom(DataTable newTable) |
void |
addTagsToCurrentStory(java.util.List<TestTag> tags) |
void |
addTagsToCurrentTest(java.util.List<TestTag> tags) |
boolean |
areStepsRunning() |
boolean |
assumptionViolated() |
void |
assumptionViolated(java.lang.String message) |
boolean |
aStepInTheCurrentTestHasFailed() |
void |
clear() |
void |
clearStepFailures() |
boolean |
currentTestIsSuspended() |
boolean |
currentTestOutcomeIsDataDriven() |
void |
dropAllListeners() |
void |
dropListener(StepListener stepListener) |
void |
exampleFinished() |
void |
exampleStarted(java.util.Map<java.lang.String,java.lang.String> data) |
void |
exceptionExpected(java.lang.Class<? extends java.lang.Throwable> expected) |
java.lang.String |
getAssumptionViolatedMessage() |
BaseStepListener |
getBaseStepListener() |
com.google.common.base.Optional<TestStep> |
getCurrentStep() |
static StepEventBus |
getEventBus()
The event bus used to inform listening classes about when tests and test steps start and finish.
|
com.google.common.base.Optional<TestResult> |
getForcedResult() |
boolean |
isCurrentTestDataDriven() |
boolean |
isDryRun() |
boolean |
isUniqueSession() |
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 |
setAllStepsTo(TestResult result)
Set all steps in the current test outcome to a given result.
|
void |
setBackgroundDescription(java.lang.String description) |
void |
setBackgroundTitle(java.lang.String title) |
void |
setUniqueSession(boolean uniqueSession) |
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(java.lang.String message) |
void |
stepStarted(ExecutedStepDescription stepDescription)
Start the execution of a test step.
|
void |
suspendTest() |
void |
takeScreenshot()
Forces Thucydides to take a screenshot now.
|
void |
temporarilySuspendWebdriverCalls() |
void |
testFailed(java.lang.Throwable cause)
The test failed, but not during the execution of a step.
|
void |
testFinished() |
void |
testFinished(TestOutcome result) |
void |
testIgnored() |
void |
testIsManual()
Mark the current test method as pending.
|
void |
testPending()
Mark the current test method as pending.
|
void |
testRetried() |
void |
testRunFinished() |
void |
testSkipped() |
void |
testStarted(java.lang.String testName) |
void |
testStarted(java.lang.String newTestName,
java.lang.Class<?> testClass) |
void |
testStarted(java.lang.String newTestName,
Story story) |
void |
testSuiteFinished() |
boolean |
testSuiteHasStarted() |
void |
testSuiteStarted(java.lang.Class<?> testClass) |
void |
testSuiteStarted(Story story) |
void |
updateCurrentStepTitle(java.lang.String stepTitle) |
void |
useExamplesFrom(DataTable table) |
boolean |
webdriverCallsAreSuspended() |
@Inject public StepEventBus(ScreenshotProcessor screenshotProcessor, EnvironmentVariables environmentVariables)
public static StepEventBus getEventBus()
public StepEventBus registerListener(StepListener listener)
public BaseStepListener getBaseStepListener()
public void testStarted(java.lang.String testName)
public boolean isUniqueSession()
public void setUniqueSession(boolean uniqueSession)
public void testStarted(java.lang.String newTestName, Story story)
public void testStarted(java.lang.String newTestName, java.lang.Class<?> testClass)
public void testSuiteStarted(java.lang.Class<?> testClass)
public void testSuiteStarted(Story story)
public void clear()
public void testFinished()
public void testFinished(TestOutcome result)
public void testRetried()
public void clearStepFailures()
public boolean aStepInTheCurrentTestHasFailed()
public boolean isCurrentTestDataDriven()
public void stepStarted(ExecutedStepDescription stepDescription)
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(java.lang.String message)
public void assumptionViolated(java.lang.String message)
public void dropListener(StepListener stepListener)
public void dropAllListeners()
public boolean webdriverCallsAreSuspended()
public void reenableWebdriverCalls()
public void temporarilySuspendWebdriverCalls()
public void testFailed(java.lang.Throwable cause)
cause
- the underlying cause of the failure.public void testPending()
public void testIsManual()
public void suspendTest()
public boolean currentTestIsSuspended()
public boolean assumptionViolated()
public void testIgnored()
public void testSkipped()
public boolean areStepsRunning()
public void notifyScreenChange()
public void testSuiteFinished()
public void testRunFinished()
public void updateCurrentStepTitle(java.lang.String stepTitle)
public void addIssuesToCurrentStory(java.util.List<java.lang.String> issues)
public void addIssuesToCurrentTest(java.util.List<java.lang.String> issues)
public void addTagsToCurrentTest(java.util.List<TestTag> tags)
public void addTagsToCurrentStory(java.util.List<TestTag> tags)
public void addDescriptionToCurrentTest(java.lang.String description)
public void setBackgroundTitle(java.lang.String title)
public void setBackgroundDescription(java.lang.String description)
public void useExamplesFrom(DataTable table)
public void addNewExamplesFrom(DataTable newTable)
public void exampleStarted(java.util.Map<java.lang.String,java.lang.String> data)
public void exampleFinished()
public boolean currentTestOutcomeIsDataDriven()
public void takeScreenshot()
public boolean testSuiteHasStarted()
public java.lang.String getAssumptionViolatedMessage()
public com.google.common.base.Optional<TestStep> getCurrentStep()
public void setAllStepsTo(TestResult result)
result
- public com.google.common.base.Optional<TestResult> getForcedResult()
public boolean isDryRun()
public void exceptionExpected(java.lang.Class<? extends java.lang.Throwable> expected)