Package net.thucydides.core.steps
Class SilentEventBus
- java.lang.Object
-
- net.thucydides.core.steps.StepEventBus
-
- net.thucydides.core.steps.SilentEventBus
-
public class SilentEventBus extends StepEventBus
-
-
Constructor Summary
Constructors Constructor Description SilentEventBus(EnvironmentVariables environmentVariables)
-
Method Summary
-
Methods inherited from class net.thucydides.core.steps.StepEventBus
castActor, clearEventBusFor, eventBusFor, exampleStarted, getEnvironmentVariables, getEventBus, initialiseSession, overrideEventBusWith, reenableWebDriver, setCurrentBusToEventBusFor, setRule, testFinished, unsuspend, updateExampleLineNumber, useScenarioOutline
-
-
-
-
Constructor Detail
-
SilentEventBus
public SilentEventBus(EnvironmentVariables environmentVariables)
-
-
Method Detail
-
registerListener
public StepEventBus registerListener(StepListener listener)
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
public BaseStepListener getBaseStepListener()
- Overrides:
getBaseStepListener
in classStepEventBus
-
testStarted
public void testStarted(String testName)
- Overrides:
testStarted
in classStepEventBus
-
testStarted
public void testStarted(String testName, String id)
- Overrides:
testStarted
in classStepEventBus
-
isUniqueSession
public boolean isUniqueSession()
- Overrides:
isUniqueSession
in classStepEventBus
-
setUniqueSession
public void setUniqueSession(boolean uniqueSession)
- Overrides:
setUniqueSession
in classStepEventBus
-
testStarted
public void testStarted(String newTestName, Story story)
- Overrides:
testStarted
in classStepEventBus
-
testStarted
public void testStarted(String newTestName, Class<?> testClass)
- Overrides:
testStarted
in classStepEventBus
-
getAllListeners
protected List<StepListener> getAllListeners()
- Overrides:
getAllListeners
in classStepEventBus
-
testSuiteStarted
public void testSuiteStarted(Class<?> testClass)
- Overrides:
testSuiteStarted
in classStepEventBus
-
testSuiteStarted
public void testSuiteStarted(Story story)
- Overrides:
testSuiteStarted
in classStepEventBus
-
clear
public void clear()
- Overrides:
clear
in classStepEventBus
-
testFinished
public void testFinished()
- Overrides:
testFinished
in classStepEventBus
-
testFinished
public void testFinished(TestOutcome result)
- 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
public void stepStarted(ExecutedStepDescription stepDescription)
Description copied from class:StepEventBus
Start the execution of a test step.- Overrides:
stepStarted
in classStepEventBus
-
stepStarted
public void stepStarted(ExecutedStepDescription stepDescription, boolean isPrecondition)
Description copied from class:StepEventBus
Start the execution of a test step.- Overrides:
stepStarted
in classStepEventBus
-
skippedStepStarted
public void skippedStepStarted(ExecutedStepDescription executedStepDescription)
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
public void stepFailed(StepFailure failure)
- Overrides:
stepFailed
in classStepEventBus
-
lastStepFailed
public void lastStepFailed(StepFailure failure)
- Overrides:
lastStepFailed
in classStepEventBus
-
stepIgnored
public void stepIgnored()
- Overrides:
stepIgnored
in classStepEventBus
-
stepPending
public void stepPending()
- Overrides:
stepPending
in classStepEventBus
-
stepPending
public void stepPending(String message)
- Overrides:
stepPending
in classStepEventBus
-
assumptionViolated
public void assumptionViolated(String message)
- Overrides:
assumptionViolated
in classStepEventBus
-
dropListener
public void dropListener(StepListener stepListener)
- 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
public void testFailed(Throwable cause)
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
public void suspendTest(TestResult result)
- 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
public void updateCurrentStepTitle(String stepTitle)
- Overrides:
updateCurrentStepTitle
in classStepEventBus
-
updateCurrentStepTitleAsPrecondition
public void updateCurrentStepTitleAsPrecondition(String stepTitle)
- Overrides:
updateCurrentStepTitleAsPrecondition
in classStepEventBus
-
addIssuesToCurrentStory
public void addIssuesToCurrentStory(List<String> issues)
- Overrides:
addIssuesToCurrentStory
in classStepEventBus
-
addIssuesToCurrentTest
public void addIssuesToCurrentTest(List<String> issues)
- Overrides:
addIssuesToCurrentTest
in classStepEventBus
-
addTagsToCurrentTest
public void addTagsToCurrentTest(List<TestTag> tags)
- Overrides:
addTagsToCurrentTest
in classStepEventBus
-
addTagsToCurrentStory
public void addTagsToCurrentStory(List<TestTag> tags)
- Overrides:
addTagsToCurrentStory
in classStepEventBus
-
addDescriptionToCurrentTest
public void addDescriptionToCurrentTest(String description)
- Overrides:
addDescriptionToCurrentTest
in classStepEventBus
-
setBackgroundTitle
public void setBackgroundTitle(String title)
- Overrides:
setBackgroundTitle
in classStepEventBus
-
setBackgroundDescription
public void setBackgroundDescription(String description)
- Overrides:
setBackgroundDescription
in classStepEventBus
-
useExamplesFrom
public void useExamplesFrom(DataTable table)
- Overrides:
useExamplesFrom
in classStepEventBus
-
addNewExamplesFrom
public void addNewExamplesFrom(DataTable newTable)
- Overrides:
addNewExamplesFrom
in classStepEventBus
-
exampleStarted
public void exampleStarted(Map<String,String> data)
- 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
public String getAssumptionViolatedMessage()
- Overrides:
getAssumptionViolatedMessage
in classStepEventBus
-
getCurrentStep
public Optional<TestStep> getCurrentStep()
- Overrides:
getCurrentStep
in classStepEventBus
-
setAllStepsTo
public void setAllStepsTo(TestResult result)
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
public Optional<TestResult> getForcedResult()
- Overrides:
getForcedResult
in classStepEventBus
-
isDryRun
public boolean isDryRun()
- Overrides:
isDryRun
in classStepEventBus
-
enableDryRun
public void enableDryRun()
- Overrides:
enableDryRun
in classStepEventBus
-
exceptionExpected
public void exceptionExpected(Class<? extends Throwable> expected)
- Overrides:
exceptionExpected
in classStepEventBus
-
resultSoFar
public Optional<TestResult> 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
public String getTestSource()
- Overrides:
getTestSource
in classStepEventBus
-
setTestSource
public void setTestSource(String testSource)
- 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
-
-