Package net.thucydides.model.logging
Class ConsoleLoggingListener
java.lang.Object
net.thucydides.model.steps.StepListenerAdapter
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 TypeMethodDescriptionvoidassumptionViolated(String message) protected org.slf4j.LoggervoidskippedStepStarted(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, boolean isInDataDrivenTest) 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) voidThe test as a whole was aborted.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 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) 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.Methods inherited from class net.thucydides.model.steps.StepListenerAdapter
addNewExamplesFrom, exampleFinished, exampleStarted, lastStepFailed, notifyScreenChange, takeScreenshots, takeScreenshots, testFailed, testIsManual, testPending, testRetried, testSuiteFinished, useExamplesFromMethods 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- Overrides:
testSuiteStartedin classStepListenerAdapter
-
testSuiteStarted
Description copied from interface:StepListenerStart a test run using JUnit 5 with a specific name -
testSuiteStarted
Description copied from interface:StepListenerStart a test run using a specific story, without a corresponding Java class.- Specified by:
testSuiteStartedin interfaceStepListener- Overrides:
testSuiteStartedin classStepListenerAdapter
-
testStarted
Description copied from interface:StepListenerA test with a given name has started.- Specified by:
testStartedin interfaceStepListener- Overrides:
testStartedin classStepListenerAdapter
-
testStarted
- Specified by:
testStartedin interfaceStepListener- Overrides:
testStartedin classStepListenerAdapter
-
testStarted
- Specified by:
testStartedin interfaceStepListener- Overrides:
testStartedin classStepListenerAdapter
-
testStarted
-
testFinished
Description copied from interface:StepListenerCalled when a test finishes.- Specified by:
testFinishedin interfaceStepListener- Overrides:
testFinishedin classStepListenerAdapter
-
testFinished
-
testFinished
- Specified by:
testFinishedin interfaceStepListener- Overrides:
testFinishedin classStepListenerAdapter
-
stepStarted
Description copied from interface:StepListenerCalled when a test step is about to be started.- Specified by:
stepStartedin interfaceStepListener- Overrides:
stepStartedin classStepListenerAdapter- Parameters:
description- the description of the test that is about to be run (generally a class and method name)
-
stepStarted
-
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- Overrides:
skippedStepStartedin classStepListenerAdapter- 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- Overrides:
stepFinishedin classStepListenerAdapter
-
stepFinished
-
stepFinished
- Specified by:
stepFinishedin interfaceStepListener- Overrides:
stepFinishedin classStepListenerAdapter
-
stepFailed
Description copied from interface:StepListenerCalled when a test step fails.- Specified by:
stepFailedin interfaceStepListener- Overrides:
stepFailedin classStepListenerAdapter- Parameters:
failure- describes the test that failed and the exception that was thrown
-
stepFailed
public void stepFailed(StepFailure failure, List<ScreenshotAndHtmlSource> screenshotList, boolean isInDataDrivenTest) Description copied from interface:StepListenerCalled when a test step fails.- Specified by:
stepFailedin interfaceStepListener- Overrides:
stepFailedin classStepListenerAdapter- Parameters:
failure- describes the test that failed and the exception that was thrownscreenshotList- list of screenshotsisInDataDrivenTest- if the step failed was called from a data driven test
-
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- Overrides:
stepIgnoredin classStepListenerAdapter
-
stepPending
public void stepPending()Description copied from interface:StepListenerThe step is marked as pending.- Specified by:
stepPendingin interfaceStepListener- Overrides:
stepPendingin classStepListenerAdapter
-
stepPending
Description copied from interface:StepListenerThe step is marked as pending with a descriptive message.- Specified by:
stepPendingin interfaceStepListener- Overrides:
stepPendingin classStepListenerAdapter- Parameters:
message-
-
testIgnored
public void testIgnored()Description copied from interface:StepListenerThe test as a whole was ignored.- Specified by:
testIgnoredin interfaceStepListener- Overrides:
testIgnoredin classStepListenerAdapter
-
testSkipped
public void testSkipped()Description copied from interface:StepListenerThe test as a whole was skipped.- Specified by:
testSkippedin interfaceStepListener- Overrides:
testSkippedin classStepListenerAdapter
-
testAborted
public void testAborted()Description copied from interface:StepListenerThe test as a whole was aborted. -
assumptionViolated
- Specified by:
assumptionViolatedin interfaceStepListener- Overrides:
assumptionViolatedin classStepListenerAdapter
-
testRunFinished
public void testRunFinished()- Specified by:
testRunFinishedin interfaceStepListener- Overrides:
testRunFinishedin classStepListenerAdapter
-