Package net.thucydides.model.logging
Class ConsoleLoggingListener
java.lang.Object
net.thucydides.model.logging.ConsoleLoggingListener
- All Implemented Interfaces:
StepListener
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsoleLoggingListener(EnvironmentVariables environmentVariables) ConsoleLoggingListener(EnvironmentVariables environmentVariables, org.slf4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewExamplesFrom(DataTable table) If multiple tables are used, this method will add any new rows to the test datavoidassumptionViolated(String message) voidAn example has finished.voidexampleStarted(Map<String, String> data) A new example has just started.protected org.slf4j.LoggervoidlastStepFailed(StepFailure failure) Declare that a step has failed after it has finished.voidvoidskippedStepStarted(ExecutedStepDescription description) Called when a test step is about to be started, but this step is scheduled to be skipped.voidstepFailed(StepFailure failure) Called when a test step fails.voidstepFailed(StepFailure failure, List<ScreenshotAndHtmlSource> screenshotList) Called when a test step fails.voidCalled when an test step has finished successfullyvoidstepFinished(List<ScreenshotAndHtmlSource> screenshotList) voidstepFinished(List<ScreenshotAndHtmlSource> screenshotList, ZonedDateTime time) voidCalled when a step will not be run, generally because a test method is annotated withorg.junit.Ignore.voidThe step is marked as pending.voidstepPending(String message) The step is marked as pending with a descriptive message.voidstepStarted(ExecutedStepDescription description) Called when a test step is about to be started.voidstepStarted(ExecutedStepDescription description, ZonedDateTime startTime) voidtakeScreenshots(List<ScreenshotAndHtmlSource> screenshots) voidtakeScreenshots(TestResult testResult, List<ScreenshotAndHtmlSource> screenshots) voidThe test as a whole was aborted.voidtestFailed(TestOutcome testOutcome, Throwable cause) The test failed, but not while executing a step.voidtestFinished(TestOutcome result) Called when a test finishes.voidtestFinished(TestOutcome result, boolean isInDataDrivenTest) voidtestFinished(TestOutcome result, boolean isInDataDrivenTest, ZonedDateTime finishTime) voidThe test as a whole was ignored.voidvoidThe test as a whole should be marked as 'pending'.voidThe last test run is about to be restartedvoidvoidThe test as a whole was skipped.voidtestStarted(String description) A test with a given name has started.voidtestStarted(String description, String id) voidtestStarted(String description, String id, ZonedDateTime startTime) voidtestStarted(String testMethod, ZonedDateTime startTime) voidEnd of a test case or story.voidtestSuiteStarted(Class<?> storyClass) Start a test run using a test case or a user story.voidtestSuiteStarted(Class<?> storyClass, String testCaseName) Start a test run using JUnit 5 with a specific namevoidtestSuiteStarted(Story story) Start a test run using a specific story, without a corresponding Java class.voiduseExamplesFrom(DataTable table) The current scenario is a data-driven scenario using test data from the specified table.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.thucydides.model.steps.StepListener
exampleStarted, exampleStarted, exampleStarted, testStarted
-
Field Details
-
SERENITY_BIG_BANNER
- See Also:
-
SERENITY_SMALL_BANNER
- See Also:
-
SERENITY_NONE_BANNER
- See Also:
-
-
Constructor Details
-
ConsoleLoggingListener
-
ConsoleLoggingListener
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger() -
testSuiteStarted
Description copied from interface:StepListenerStart a test run using a test case or a user story. For JUnit tests, the test case should be provided. The test case should be annotated with the Story annotation to indicate what user story it tests. Otherwise, the test case itself will be treated as a user story. For easyb stories, the story class can be provided directly.- Specified by:
testSuiteStartedin interfaceStepListener
-
testSuiteStarted
Description copied from interface:StepListenerStart a test run using JUnit 5 with a specific name- Specified by:
testSuiteStartedin interfaceStepListener
-
testSuiteStarted
Description copied from interface:StepListenerStart a test run using a specific story, without a corresponding Java class.- Specified by:
testSuiteStartedin interfaceStepListener
-
testSuiteFinished
public void testSuiteFinished()Description copied from interface:StepListenerEnd of a test case or story.- Specified by:
testSuiteFinishedin interfaceStepListener
-
testStarted
Description copied from interface:StepListenerA test with a given name has started.- Specified by:
testStartedin interfaceStepListener
-
testStarted
- Specified by:
testStartedin interfaceStepListener
-
testStarted
- Specified by:
testStartedin interfaceStepListener
-
testStarted
- Specified by:
testStartedin interfaceStepListener
-
testFinished
Description copied from interface:StepListenerCalled when a test finishes.- Specified by:
testFinishedin interfaceStepListener
-
testFinished
- Specified by:
testFinishedin interfaceStepListener
-
testFinished
- Specified by:
testFinishedin interfaceStepListener
-
testRetried
public void testRetried()Description copied from interface:StepListenerThe last test run is about to be restarted- Specified by:
testRetriedin interfaceStepListener
-
stepStarted
Description copied from interface:StepListenerCalled when a test step is about to be started.- Specified by:
stepStartedin interfaceStepListener- Parameters:
description- the description of the test that is about to be run (generally a class and method name)
-
stepStarted
- Specified by:
stepStartedin interfaceStepListener
-
skippedStepStarted
Description copied from interface:StepListenerCalled when a test step is about to be started, but this step is scheduled to be skipped.- Specified by:
skippedStepStartedin interfaceStepListener- Parameters:
description- the description of the test that is about to be run (generally a class and method name)
-
stepFinished
public void stepFinished()Description copied from interface:StepListenerCalled when an test step has finished successfully- Specified by:
stepFinishedin interfaceStepListener
-
stepFinished
- Specified by:
stepFinishedin interfaceStepListener
-
stepFinished
- Specified by:
stepFinishedin interfaceStepListener
-
stepFailed
Description copied from interface:StepListenerCalled when a test step fails.- Specified by:
stepFailedin interfaceStepListener- Parameters:
failure- describes the test that failed and the exception that was thrown
-
stepFailed
Description copied from interface:StepListenerCalled when a test step fails.- Specified by:
stepFailedin interfaceStepListener- Parameters:
failure- describes the test that failed and the exception that was thrown
-
lastStepFailed
Description copied from interface:StepListenerDeclare that a step has failed after it has finished.- Specified by:
lastStepFailedin interfaceStepListener
-
stepIgnored
public void stepIgnored()Description copied from interface:StepListenerCalled when a step will not be run, generally because a test method is annotated withorg.junit.Ignore.- Specified by:
stepIgnoredin interfaceStepListener
-
stepPending
public void stepPending()Description copied from interface:StepListenerThe step is marked as pending.- Specified by:
stepPendingin interfaceStepListener
-
stepPending
Description copied from interface:StepListenerThe step is marked as pending with a descriptive message.- Specified by:
stepPendingin interfaceStepListener- Parameters:
message-
-
testFailed
Description copied from interface:StepListenerThe test failed, but not while executing a step.- Specified by:
testFailedin interfaceStepListener- Parameters:
testOutcome- The test outcome structure for the failing testcause- The exception that triggered the failure
-
testIgnored
public void testIgnored()Description copied from interface:StepListenerThe test as a whole was ignored.- Specified by:
testIgnoredin interfaceStepListener
-
testSkipped
public void testSkipped()Description copied from interface:StepListenerThe test as a whole was skipped.- Specified by:
testSkippedin interfaceStepListener
-
testAborted
public void testAborted()Description copied from interface:StepListenerThe test as a whole was aborted.- Specified by:
testAbortedin interfaceStepListener
-
testPending
public void testPending()Description copied from interface:StepListenerThe test as a whole should be marked as 'pending'.- Specified by:
testPendingin interfaceStepListener
-
testIsManual
public void testIsManual()- Specified by:
testIsManualin interfaceStepListener
-
notifyScreenChange
public void notifyScreenChange()- Specified by:
notifyScreenChangein interfaceStepListener
-
useExamplesFrom
Description copied from interface:StepListenerThe current scenario is a data-driven scenario using test data from the specified table.- Specified by:
useExamplesFromin interfaceStepListener
-
addNewExamplesFrom
Description copied from interface:StepListenerIf multiple tables are used, this method will add any new rows to the test data- Specified by:
addNewExamplesFromin interfaceStepListener
-
exampleStarted
Description copied from interface:StepListenerA new example has just started.- Specified by:
exampleStartedin interfaceStepListener
-
exampleFinished
public void exampleFinished()Description copied from interface:StepListenerAn example has finished.- Specified by:
exampleFinishedin interfaceStepListener
-
assumptionViolated
- Specified by:
assumptionViolatedin interfaceStepListener
-
testRunFinished
public void testRunFinished()- Specified by:
testRunFinishedin interfaceStepListener
-
takeScreenshots
- Specified by:
takeScreenshotsin interfaceStepListener
-
takeScreenshots
- Specified by:
takeScreenshotsin interfaceStepListener
-