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 TypeMethodDescriptionvoidaddDescriptionToCurrentTest(String description) voidaddIssuesToCurrentStory(List<String> issues) voidaddIssuesToCurrentTest(List<String> issues) voidaddNewExamplesFrom(DataTable newTable) voidaddTagsToCurrentStory(List<TestTag> tags) voidaddTagsToCurrentTest(List<TestTag> tags) booleanbooleanvoidassumptionViolated(String message) booleanvoidvoidclear()voidbooleanbooleanvoidvoidvoiddropListener(StepListener stepListener) voidvoidvoidvoidexampleStarted(Map<String, String> data) voidexceptionExpected(Class<? extends Throwable> expected) protected List<StepListener>booleanbooleanbooleanisDryRun()booleanvoidlastStepFailed(StepFailure failure) voidlastTestPassedAfterRetries(int remainingTries, List<String> failureMessages, TestFailureCause testFailureCause) voidvoidvoidregisterListener(StepListener listener) Register a listener to receive notification at different points during a test's execution.voidreset()voidsetAllStepsTo(TestResult result) Set all steps in the current test outcome to a given result.voidsetBackgroundDescription(String description) voidsetBackgroundTitle(String title) voidsetTestSource(String testSource) voidsetUniqueSession(boolean uniqueSession) voidskippedStepStarted(ExecutedStepDescription executedStepDescription) Record a step that is not scheduled to be executed (e.g.booleanvoidstepFailed(StepFailure failure) voidvoidvoidvoidstepPending(String message) voidstepStarted(ExecutedStepDescription stepDescription) Start the execution of a test step.voidstepStarted(ExecutedStepDescription stepDescription, boolean isPrecondition) Start the execution of a test step.voidvoidsuspendTest(TestResult result) voidForces Thucydides to take a screenshot now.voidvoidtestFailed(Throwable cause) The test failed, but not during the execution of a step.voidvoidtestFinished(TestOutcome result) voidvoidMark the current test method as pending.voidMark the current test method as pending.voidvoidvoidvoidtestStarted(String testName) voidtestStarted(String newTestName, Class<?> testClass) voidtestStarted(String testName, String id) voidtestStarted(String newTestName, Story story) voidbooleanvoidtestSuiteStarted(Class<?> testClass) voidtestSuiteStarted(Story story) voidupdateCurrentStepTitle(String stepTitle) voidupdateCurrentStepTitleAsPrecondition(String stepTitle) voidvoiduseExamplesFrom(DataTable table) booleanMethods 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: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
- Overrides:
testStartedin classStepEventBus
-
testStarted
- Overrides:
testStartedin classStepEventBus
-
isUniqueSession
public boolean isUniqueSession()- Overrides:
isUniqueSessionin classStepEventBus
-
setUniqueSession
public void setUniqueSession(boolean uniqueSession) - Overrides:
setUniqueSessionin classStepEventBus
-
testStarted
- Overrides:
testStartedin classStepEventBus
-
testStarted
- Overrides:
testStartedin classStepEventBus
-
getAllListeners
- Overrides:
getAllListenersin classStepEventBus
-
testSuiteStarted
- 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
- Overrides:
stepPendingin classStepEventBus
-
assumptionViolated
- 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
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
- Overrides:
updateCurrentStepTitlein classStepEventBus
-
updateCurrentStepTitleAsPrecondition
- Overrides:
updateCurrentStepTitleAsPreconditionin classStepEventBus
-
addIssuesToCurrentStory
- Overrides:
addIssuesToCurrentStoryin classStepEventBus
-
addIssuesToCurrentTest
- Overrides:
addIssuesToCurrentTestin classStepEventBus
-
addTagsToCurrentTest
- Overrides:
addTagsToCurrentTestin classStepEventBus
-
addTagsToCurrentStory
- Overrides:
addTagsToCurrentStoryin classStepEventBus
-
addDescriptionToCurrentTest
- Overrides:
addDescriptionToCurrentTestin classStepEventBus
-
setBackgroundTitle
- Overrides:
setBackgroundTitlein classStepEventBus
-
setBackgroundDescription
- Overrides:
setBackgroundDescriptionin classStepEventBus
-
useExamplesFrom
- Overrides:
useExamplesFromin classStepEventBus
-
addNewExamplesFrom
- Overrides:
addNewExamplesFromin classStepEventBus
-
exampleStarted
- 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
- 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
- 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
- Overrides:
getTestSourcein classStepEventBus
-
setTestSource
- Overrides:
setTestSourcein classStepEventBus
-
cancelPreviousTest
public void cancelPreviousTest()- Overrides:
cancelPreviousTestin classStepEventBus
-
lastTestPassedAfterRetries
public void lastTestPassedAfterRetries(int remainingTries, List<String> failureMessages, TestFailureCause testFailureCause) - Overrides:
lastTestPassedAfterRetriesin classStepEventBus
-