Package net.thucydides.core.steps
Class SilentEventBus
java.lang.Object
net.thucydides.core.steps.StepEventBus
net.thucydides.core.steps.SilentEventBus
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptionToCurrentTest
(String description) void
addIssuesToCurrentStory
(List<String> issues) void
addIssuesToCurrentTest
(List<String> issues) void
addNewExamplesFrom
(DataTable newTable) void
addTagsToCurrentStory
(List<TestTag> tags) void
addTagsToCurrentTest
(List<TestTag> tags) boolean
boolean
void
assumptionViolated
(String message) boolean
void
void
clear()
void
boolean
boolean
void
void
void
dropListener
(StepListener stepListener) void
void
void
void
exampleStarted
(Map<String, String> data) void
exceptionExpected
(Class<? extends Throwable> expected) protected List<StepListener>
boolean
boolean
boolean
isDryRun()
boolean
void
lastStepFailed
(StepFailure failure) void
lastTestPassedAfterRetries
(int remainingTries, List<String> failureMessages, TestFailureCause testFailureCause) void
void
void
registerListener
(StepListener listener) Register a listener to receive notification at different points during a test's execution.void
reset()
void
setAllStepsTo
(TestResult result) Set all steps in the current test outcome to a given result.void
setBackgroundDescription
(String description) void
setBackgroundTitle
(String title) void
setTestSource
(String testSource) void
setUniqueSession
(boolean uniqueSession) void
skippedStepStarted
(ExecutedStepDescription executedStepDescription) Record a step that is not scheduled to be executed (e.g.boolean
void
stepFailed
(StepFailure failure) void
void
void
void
stepPending
(String message) void
stepStarted
(ExecutedStepDescription stepDescription) Start the execution of a test step.void
stepStarted
(ExecutedStepDescription stepDescription, boolean isPrecondition) Start the execution of a test step.void
void
suspendTest
(TestResult result) void
Forces Thucydides to take a screenshot now.void
void
testFailed
(Throwable cause) The test failed, but not during the execution of a step.void
void
testFinished
(TestOutcome result) void
void
Mark the current test method as pending.void
Mark the current test method as pending.void
void
void
void
testStarted
(String testName) void
testStarted
(String newTestName, Class<?> testClass) void
testStarted
(String testName, String id) void
testStarted
(String newTestName, Story story) void
boolean
void
testSuiteStarted
(Class<?> testClass) void
testSuiteStarted
(Story story) void
updateCurrentStepTitle
(String stepTitle) void
updateCurrentStepTitleAsPrecondition
(String stepTitle) void
void
useExamplesFrom
(DataTable table) boolean
Methods inherited from class net.thucydides.core.steps.StepEventBus
castActor, clearEventBusFor, dropAgent, dropAgents, eventBusFor, exampleStarted, finishTestRun, getEnvironmentVariables, getEventBus, initialiseSession, mergeActivitiesToDefaultStepListener, mergeActivitiesToDefaultStepListener, notifyFailure, overrideEventBusWith, reenableWebDriver, registerAgent, registerAgents, setCurrentBusToEventBusFor, setRule, testAborted, testFinished, unsuspend, updateExampleLineNumber, useScenarioOutline
-
Constructor Details
-
SilentEventBus
-
-
Method Details
-
registerListener
Description copied from class:StepEventBus
Register a listener to receive notification at different points during a test's execution. If you are writing your own listener, you shouldn't need to call this method - just set up your listener implementation as a service (see http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html), place the listener class on the classpath and it will be detected automatically.- Overrides:
registerListener
in classStepEventBus
-
isBaseStepListenerRegistered
public boolean isBaseStepListenerRegistered()- Overrides:
isBaseStepListenerRegistered
in classStepEventBus
-
getBaseStepListener
- Overrides:
getBaseStepListener
in classStepEventBus
-
testStarted
- Overrides:
testStarted
in classStepEventBus
-
testStarted
- Overrides:
testStarted
in classStepEventBus
-
isUniqueSession
public boolean isUniqueSession()- Overrides:
isUniqueSession
in classStepEventBus
-
setUniqueSession
public void setUniqueSession(boolean uniqueSession) - Overrides:
setUniqueSession
in classStepEventBus
-
testStarted
- Overrides:
testStarted
in classStepEventBus
-
testStarted
- Overrides:
testStarted
in classStepEventBus
-
getAllListeners
- Overrides:
getAllListeners
in classStepEventBus
-
testSuiteStarted
- Overrides:
testSuiteStarted
in classStepEventBus
-
testSuiteStarted
- Overrides:
testSuiteStarted
in classStepEventBus
-
clear
public void clear()- Overrides:
clear
in classStepEventBus
-
testFinished
public void testFinished()- Overrides:
testFinished
in classStepEventBus
-
testFinished
- Overrides:
testFinished
in classStepEventBus
-
testRetried
public void testRetried()- Overrides:
testRetried
in classStepEventBus
-
clearStepFailures
public void clearStepFailures()- Overrides:
clearStepFailures
in classStepEventBus
-
aStepInTheCurrentTestHasFailed
public boolean aStepInTheCurrentTestHasFailed()- Overrides:
aStepInTheCurrentTestHasFailed
in classStepEventBus
-
isCurrentTestDataDriven
public boolean isCurrentTestDataDriven()- Overrides:
isCurrentTestDataDriven
in classStepEventBus
-
stepStarted
Description copied from class:StepEventBus
Start the execution of a test step.- Overrides:
stepStarted
in classStepEventBus
-
stepStarted
Description copied from class:StepEventBus
Start the execution of a test step.- Overrides:
stepStarted
in classStepEventBus
-
skippedStepStarted
Description copied from class:StepEventBus
Record a step that is not scheduled to be executed (e.g. a skipped or ignored step).- Overrides:
skippedStepStarted
in classStepEventBus
-
stepFinished
public void stepFinished()- Overrides:
stepFinished
in classStepEventBus
-
stepFailed
- Overrides:
stepFailed
in classStepEventBus
-
lastStepFailed
- Overrides:
lastStepFailed
in classStepEventBus
-
stepIgnored
public void stepIgnored()- Overrides:
stepIgnored
in classStepEventBus
-
stepPending
public void stepPending()- Overrides:
stepPending
in classStepEventBus
-
stepPending
- Overrides:
stepPending
in classStepEventBus
-
assumptionViolated
- Overrides:
assumptionViolated
in classStepEventBus
-
dropListener
- Overrides:
dropListener
in classStepEventBus
-
dropAllListeners
public void dropAllListeners()- Overrides:
dropAllListeners
in classStepEventBus
-
webdriverCallsAreSuspended
public boolean webdriverCallsAreSuspended()- Overrides:
webdriverCallsAreSuspended
in classStepEventBus
-
reenableWebdriverCalls
public void reenableWebdriverCalls()- Overrides:
reenableWebdriverCalls
in classStepEventBus
-
temporarilySuspendWebdriverCalls
public void temporarilySuspendWebdriverCalls()- Overrides:
temporarilySuspendWebdriverCalls
in classStepEventBus
-
testFailed
Description copied from class:StepEventBus
The test failed, but not during the execution of a step.- Overrides:
testFailed
in classStepEventBus
- Parameters:
cause
- the underlying cause of the failure.
-
testPending
public void testPending()Description copied from class:StepEventBus
Mark the current test method as pending. The test will stil be executed to record the steps, but any webdriver calls will be skipped.- Overrides:
testPending
in classStepEventBus
-
testIsManual
public void testIsManual()Description copied from class:StepEventBus
Mark the current test method as pending. The test will stil be executed to record the steps, but any webdriver calls will be skipped.- Overrides:
testIsManual
in classStepEventBus
-
suspendTest
public void suspendTest()- Overrides:
suspendTest
in classStepEventBus
-
suspendTest
- Overrides:
suspendTest
in classStepEventBus
-
currentTestIsSuspended
public boolean currentTestIsSuspended()- Overrides:
currentTestIsSuspended
in classStepEventBus
-
assumptionViolated
public boolean assumptionViolated()- Overrides:
assumptionViolated
in classStepEventBus
-
testIgnored
public void testIgnored()- Overrides:
testIgnored
in classStepEventBus
-
testSkipped
public void testSkipped()- Overrides:
testSkipped
in classStepEventBus
-
areStepsRunning
public boolean areStepsRunning()- Overrides:
areStepsRunning
in classStepEventBus
-
notifyScreenChange
public void notifyScreenChange()- Overrides:
notifyScreenChange
in classStepEventBus
-
testSuiteFinished
public void testSuiteFinished()- Overrides:
testSuiteFinished
in classStepEventBus
-
testRunFinished
public void testRunFinished()- Overrides:
testRunFinished
in classStepEventBus
-
updateCurrentStepTitle
- Overrides:
updateCurrentStepTitle
in classStepEventBus
-
updateCurrentStepTitleAsPrecondition
- Overrides:
updateCurrentStepTitleAsPrecondition
in classStepEventBus
-
addIssuesToCurrentStory
- Overrides:
addIssuesToCurrentStory
in classStepEventBus
-
addIssuesToCurrentTest
- Overrides:
addIssuesToCurrentTest
in classStepEventBus
-
addTagsToCurrentTest
- Overrides:
addTagsToCurrentTest
in classStepEventBus
-
addTagsToCurrentStory
- Overrides:
addTagsToCurrentStory
in classStepEventBus
-
addDescriptionToCurrentTest
- Overrides:
addDescriptionToCurrentTest
in classStepEventBus
-
setBackgroundTitle
- Overrides:
setBackgroundTitle
in classStepEventBus
-
setBackgroundDescription
- Overrides:
setBackgroundDescription
in classStepEventBus
-
useExamplesFrom
- Overrides:
useExamplesFrom
in classStepEventBus
-
addNewExamplesFrom
- Overrides:
addNewExamplesFrom
in classStepEventBus
-
exampleStarted
- Overrides:
exampleStarted
in classStepEventBus
-
exampleFinished
public void exampleFinished()- Overrides:
exampleFinished
in classStepEventBus
-
currentTestOutcomeIsDataDriven
public boolean currentTestOutcomeIsDataDriven()- Overrides:
currentTestOutcomeIsDataDriven
in classStepEventBus
-
takeScreenshot
public void takeScreenshot()Description copied from class:StepEventBus
Forces Thucydides to take a screenshot now.- Overrides:
takeScreenshot
in classStepEventBus
-
testSuiteHasStarted
public boolean testSuiteHasStarted()- Overrides:
testSuiteHasStarted
in classStepEventBus
-
getAssumptionViolatedMessage
- Overrides:
getAssumptionViolatedMessage
in classStepEventBus
-
getCurrentStep
- Overrides:
getCurrentStep
in classStepEventBus
-
setAllStepsTo
Description copied from class:StepEventBus
Set all steps in the current test outcome to a given result. Used to set all steps to PENDING or SKIPPED, for example.- Overrides:
setAllStepsTo
in classStepEventBus
-
getForcedResult
- Overrides:
getForcedResult
in classStepEventBus
-
isDryRun
public boolean isDryRun()- Overrides:
isDryRun
in classStepEventBus
-
enableDryRun
public void enableDryRun()- Overrides:
enableDryRun
in classStepEventBus
-
exceptionExpected
- Overrides:
exceptionExpected
in classStepEventBus
-
resultSoFar
- Overrides:
resultSoFar
in classStepEventBus
-
mergePreviousStep
public void mergePreviousStep()- Overrides:
mergePreviousStep
in classStepEventBus
-
updateOverallResults
public void updateOverallResults()- Overrides:
updateOverallResults
in classStepEventBus
-
reset
public void reset()- Overrides:
reset
in classStepEventBus
-
disableSoftAsserts
public void disableSoftAsserts()- Overrides:
disableSoftAsserts
in classStepEventBus
-
enableSoftAsserts
public void enableSoftAsserts()- Overrides:
enableSoftAsserts
in classStepEventBus
-
softAssertsActive
public boolean softAssertsActive()- Overrides:
softAssertsActive
in classStepEventBus
-
getTestSource
- Overrides:
getTestSource
in classStepEventBus
-
setTestSource
- Overrides:
setTestSource
in classStepEventBus
-
cancelPreviousTest
public void cancelPreviousTest()- Overrides:
cancelPreviousTest
in classStepEventBus
-
lastTestPassedAfterRetries
public void lastTestPassedAfterRetries(int remainingTries, List<String> failureMessages, TestFailureCause testFailureCause) - Overrides:
lastTestPassedAfterRetries
in classStepEventBus
-