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
Modifier and Type Method Description voidaddDescriptionToCurrentTest(java.lang.String description)voidaddIssuesToCurrentStory(java.util.List<java.lang.String> issues)voidaddIssuesToCurrentTest(java.util.List<java.lang.String> issues)voidaddNewExamplesFrom(DataTable newTable)voidaddTagsToCurrentStory(java.util.List<TestTag> tags)voidaddTagsToCurrentTest(java.util.List<TestTag> tags)booleanareStepsRunning()booleanassumptionViolated()voidassumptionViolated(java.lang.String message)booleanaStepInTheCurrentTestHasFailed()voidcancelPreviousTest()voidclear()voidclearStepFailures()booleancurrentTestIsSuspended()booleancurrentTestOutcomeIsDataDriven()voiddisableSoftAsserts()voiddropAllListeners()voiddropListener(StepListener stepListener)voidenableDryRun()voidenableSoftAsserts()voidexampleFinished()voidexampleStarted(java.util.Map<java.lang.String,java.lang.String> data)voidexceptionExpected(java.lang.Class<? extends java.lang.Throwable> expected)protected java.util.List<StepListener>getAllListeners()java.lang.StringgetAssumptionViolatedMessage()BaseStepListenergetBaseStepListener()java.util.Optional<TestStep>getCurrentStep()java.util.Optional<TestResult>getForcedResult()java.lang.StringgetTestSource()booleanisBaseStepListenerRegistered()booleanisCurrentTestDataDriven()booleanisDryRun()booleanisUniqueSession()voidlastStepFailed(StepFailure failure)voidlastTestPassedAfterRetries(int remainingTries, java.util.List<java.lang.String> failureMessages, TestFailureCause testFailureCause)voidmergePreviousStep()voidnotifyScreenChange()voidreenableWebdriverCalls()StepEventBusregisterListener(StepListener listener)Register a listener to receive notification at different points during a test's execution.voidreset()java.util.Optional<TestResult>resultSoFar()voidsetAllStepsTo(TestResult result)Set all steps in the current test outcome to a given result.voidsetBackgroundDescription(java.lang.String description)voidsetBackgroundTitle(java.lang.String title)voidsetTestSource(java.lang.String testSource)voidsetUniqueSession(boolean uniqueSession)voidskippedStepStarted(ExecutedStepDescription executedStepDescription)Record a step that is not scheduled to be executed (e.g.booleansoftAssertsActive()voidstepFailed(StepFailure failure)voidstepFinished()voidstepIgnored()voidstepPending()voidstepPending(java.lang.String message)voidstepStarted(ExecutedStepDescription stepDescription)Start the execution of a test step.voidstepStarted(ExecutedStepDescription stepDescription, boolean isPrecondition)Start the execution of a test step.voidsuspendTest()voidsuspendTest(TestResult result)voidtakeScreenshot()Forces Thucydides to take a screenshot now.voidtemporarilySuspendWebdriverCalls()voidtestFailed(java.lang.Throwable cause)The test failed, but not during the execution of a step.voidtestFinished()voidtestFinished(TestOutcome result)voidtestIgnored()voidtestIsManual()Mark the current test method as pending.voidtestPending()Mark the current test method as pending.voidtestRetried()voidtestRunFinished()voidtestSkipped()voidtestStarted(java.lang.String testName)voidtestStarted(java.lang.String newTestName, java.lang.Class<?> testClass)voidtestStarted(java.lang.String testName, java.lang.String id)voidtestStarted(java.lang.String newTestName, Story story)voidtestSuiteFinished()booleantestSuiteHasStarted()voidtestSuiteStarted(java.lang.Class<?> testClass)voidtestSuiteStarted(Story story)voidupdateCurrentStepTitle(java.lang.String stepTitle)voidupdateCurrentStepTitleAsPrecondition(java.lang.String stepTitle)voidupdateOverallResults()voiduseExamplesFrom(DataTable table)booleanwebdriverCallsAreSuspended()Methods inherited from class net.thucydides.core.steps.StepEventBus
castActor, clearEventBusFor, dropAgent, dropAgents, eventBusFor, exampleStarted, finishTestRun, getEnvironmentVariables, getEventBus, initialiseSession, mergeActivitiesToDefaultStepListener, mergeActivitiesToDefaultStepListener, overrideEventBusWith, reenableWebDriver, registerAgent, registerAgents, setCurrentBusToEventBusFor, setRule, testFinished, unsuspend, updateExampleLineNumber, useScenarioOutlineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SilentEventBus
-
-
Method Details
-
registerListener
Description copied from class:StepEventBusRegister 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:
registerListenerin classStepEventBus
-
isBaseStepListenerRegistered
public boolean isBaseStepListenerRegistered()- Overrides:
isBaseStepListenerRegisteredin classStepEventBus
-
getBaseStepListener
- Overrides:
getBaseStepListenerin classStepEventBus
-
testStarted
public void testStarted(java.lang.String testName)- Overrides:
testStartedin classStepEventBus
-
testStarted
public void testStarted(java.lang.String testName, java.lang.String id)- Overrides:
testStartedin classStepEventBus
-
isUniqueSession
public boolean isUniqueSession()- Overrides:
isUniqueSessionin classStepEventBus
-
setUniqueSession
public void setUniqueSession(boolean uniqueSession)- Overrides:
setUniqueSessionin classStepEventBus
-
testStarted
- Overrides:
testStartedin classStepEventBus
-
testStarted
public void testStarted(java.lang.String newTestName, java.lang.Class<?> testClass)- Overrides:
testStartedin classStepEventBus
-
getAllListeners
- Overrides:
getAllListenersin classStepEventBus
-
testSuiteStarted
public void testSuiteStarted(java.lang.Class<?> testClass)- Overrides:
testSuiteStartedin classStepEventBus
-
testSuiteStarted
- Overrides:
testSuiteStartedin classStepEventBus
-
clear
public void clear()- Overrides:
clearin classStepEventBus
-
testFinished
public void testFinished()- Overrides:
testFinishedin classStepEventBus
-
testFinished
- Overrides:
testFinishedin classStepEventBus
-
testRetried
public void testRetried()- Overrides:
testRetriedin classStepEventBus
-
clearStepFailures
public void clearStepFailures()- Overrides:
clearStepFailuresin classStepEventBus
-
aStepInTheCurrentTestHasFailed
public boolean aStepInTheCurrentTestHasFailed()- Overrides:
aStepInTheCurrentTestHasFailedin classStepEventBus
-
isCurrentTestDataDriven
public boolean isCurrentTestDataDriven()- Overrides:
isCurrentTestDataDrivenin classStepEventBus
-
stepStarted
Description copied from class:StepEventBusStart the execution of a test step.- Overrides:
stepStartedin classStepEventBus
-
stepStarted
Description copied from class:StepEventBusStart the execution of a test step.- Overrides:
stepStartedin classStepEventBus
-
skippedStepStarted
Description copied from class:StepEventBusRecord a step that is not scheduled to be executed (e.g. a skipped or ignored step).- Overrides:
skippedStepStartedin classStepEventBus
-
stepFinished
public void stepFinished()- Overrides:
stepFinishedin classStepEventBus
-
stepFailed
- Overrides:
stepFailedin classStepEventBus
-
lastStepFailed
- Overrides:
lastStepFailedin classStepEventBus
-
stepIgnored
public void stepIgnored()- Overrides:
stepIgnoredin classStepEventBus
-
stepPending
public void stepPending()- Overrides:
stepPendingin classStepEventBus
-
stepPending
public void stepPending(java.lang.String message)- Overrides:
stepPendingin classStepEventBus
-
assumptionViolated
public void assumptionViolated(java.lang.String message)- Overrides:
assumptionViolatedin classStepEventBus
-
dropListener
- Overrides:
dropListenerin classStepEventBus
-
dropAllListeners
public void dropAllListeners()- Overrides:
dropAllListenersin classStepEventBus
-
webdriverCallsAreSuspended
public boolean webdriverCallsAreSuspended()- Overrides:
webdriverCallsAreSuspendedin classStepEventBus
-
reenableWebdriverCalls
public void reenableWebdriverCalls()- Overrides:
reenableWebdriverCallsin classStepEventBus
-
temporarilySuspendWebdriverCalls
public void temporarilySuspendWebdriverCalls()- Overrides:
temporarilySuspendWebdriverCallsin classStepEventBus
-
testFailed
public void testFailed(java.lang.Throwable cause)Description copied from class:StepEventBusThe test failed, but not during the execution of a step.- Overrides:
testFailedin classStepEventBus- Parameters:
cause- the underlying cause of the failure.
-
testPending
public void testPending()Description copied from class:StepEventBusMark the current test method as pending. The test will stil be executed to record the steps, but any webdriver calls will be skipped.- Overrides:
testPendingin classStepEventBus
-
testIsManual
public void testIsManual()Description copied from class:StepEventBusMark the current test method as pending. The test will stil be executed to record the steps, but any webdriver calls will be skipped.- Overrides:
testIsManualin classStepEventBus
-
suspendTest
public void suspendTest()- Overrides:
suspendTestin classStepEventBus
-
suspendTest
- Overrides:
suspendTestin classStepEventBus
-
currentTestIsSuspended
public boolean currentTestIsSuspended()- Overrides:
currentTestIsSuspendedin classStepEventBus
-
assumptionViolated
public boolean assumptionViolated()- Overrides:
assumptionViolatedin classStepEventBus
-
testIgnored
public void testIgnored()- Overrides:
testIgnoredin classStepEventBus
-
testSkipped
public void testSkipped()- Overrides:
testSkippedin classStepEventBus
-
areStepsRunning
public boolean areStepsRunning()- Overrides:
areStepsRunningin classStepEventBus
-
notifyScreenChange
public void notifyScreenChange()- Overrides:
notifyScreenChangein classStepEventBus
-
testSuiteFinished
public void testSuiteFinished()- Overrides:
testSuiteFinishedin classStepEventBus
-
testRunFinished
public void testRunFinished()- Overrides:
testRunFinishedin classStepEventBus
-
updateCurrentStepTitle
public void updateCurrentStepTitle(java.lang.String stepTitle)- Overrides:
updateCurrentStepTitlein classStepEventBus
-
updateCurrentStepTitleAsPrecondition
public void updateCurrentStepTitleAsPrecondition(java.lang.String stepTitle)- Overrides:
updateCurrentStepTitleAsPreconditionin classStepEventBus
-
addIssuesToCurrentStory
public void addIssuesToCurrentStory(java.util.List<java.lang.String> issues)- Overrides:
addIssuesToCurrentStoryin classStepEventBus
-
addIssuesToCurrentTest
public void addIssuesToCurrentTest(java.util.List<java.lang.String> issues)- Overrides:
addIssuesToCurrentTestin classStepEventBus
-
addTagsToCurrentTest
- Overrides:
addTagsToCurrentTestin classStepEventBus
-
addTagsToCurrentStory
- Overrides:
addTagsToCurrentStoryin classStepEventBus
-
addDescriptionToCurrentTest
public void addDescriptionToCurrentTest(java.lang.String description)- Overrides:
addDescriptionToCurrentTestin classStepEventBus
-
setBackgroundTitle
public void setBackgroundTitle(java.lang.String title)- Overrides:
setBackgroundTitlein classStepEventBus
-
setBackgroundDescription
public void setBackgroundDescription(java.lang.String description)- Overrides:
setBackgroundDescriptionin classStepEventBus
-
useExamplesFrom
- Overrides:
useExamplesFromin classStepEventBus
-
addNewExamplesFrom
- Overrides:
addNewExamplesFromin classStepEventBus
-
exampleStarted
public void exampleStarted(java.util.Map<java.lang.String,java.lang.String> data)- Overrides:
exampleStartedin classStepEventBus
-
exampleFinished
public void exampleFinished()- Overrides:
exampleFinishedin classStepEventBus
-
currentTestOutcomeIsDataDriven
public boolean currentTestOutcomeIsDataDriven()- Overrides:
currentTestOutcomeIsDataDrivenin classStepEventBus
-
takeScreenshot
public void takeScreenshot()Description copied from class:StepEventBusForces Thucydides to take a screenshot now.- Overrides:
takeScreenshotin classStepEventBus
-
testSuiteHasStarted
public boolean testSuiteHasStarted()- Overrides:
testSuiteHasStartedin classStepEventBus
-
getAssumptionViolatedMessage
public java.lang.String getAssumptionViolatedMessage()- Overrides:
getAssumptionViolatedMessagein classStepEventBus
-
getCurrentStep
- Overrides:
getCurrentStepin classStepEventBus
-
setAllStepsTo
Description copied from class:StepEventBusSet all steps in the current test outcome to a given result. Used to set all steps to PENDING or SKIPPED, for example.- Overrides:
setAllStepsToin classStepEventBus
-
getForcedResult
- Overrides:
getForcedResultin classStepEventBus
-
isDryRun
public boolean isDryRun()- Overrides:
isDryRunin classStepEventBus
-
enableDryRun
public void enableDryRun()- Overrides:
enableDryRunin classStepEventBus
-
exceptionExpected
public void exceptionExpected(java.lang.Class<? extends java.lang.Throwable> expected)- Overrides:
exceptionExpectedin classStepEventBus
-
resultSoFar
- Overrides:
resultSoFarin classStepEventBus
-
mergePreviousStep
public void mergePreviousStep()- Overrides:
mergePreviousStepin classStepEventBus
-
updateOverallResults
public void updateOverallResults()- Overrides:
updateOverallResultsin classStepEventBus
-
reset
public void reset()- Overrides:
resetin classStepEventBus
-
disableSoftAsserts
public void disableSoftAsserts()- Overrides:
disableSoftAssertsin classStepEventBus
-
enableSoftAsserts
public void enableSoftAsserts()- Overrides:
enableSoftAssertsin classStepEventBus
-
softAssertsActive
public boolean softAssertsActive()- Overrides:
softAssertsActivein classStepEventBus
-
getTestSource
public java.lang.String getTestSource()- Overrides:
getTestSourcein classStepEventBus
-
setTestSource
public void setTestSource(java.lang.String testSource)- Overrides:
setTestSourcein classStepEventBus
-
cancelPreviousTest
public void cancelPreviousTest()- Overrides:
cancelPreviousTestin classStepEventBus
-
lastTestPassedAfterRetries
public void lastTestPassedAfterRetries(int remainingTries, java.util.List<java.lang.String> failureMessages, TestFailureCause testFailureCause)- Overrides:
lastTestPassedAfterRetriesin classStepEventBus
-