public class ConsoleLoggingListener extends Object implements StepListener
| Modifier and Type | Field and Description |
|---|---|
static String |
SERENITY_BIG_BANNER |
static String |
SERENITY_NONE_BANNER |
static String |
SERENITY_SMALL_BANNER |
| Constructor and Description |
|---|
ConsoleLoggingListener(EnvironmentVariables environmentVariables) |
ConsoleLoggingListener(EnvironmentVariables environmentVariables,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNewExamplesFrom(DataTable table)
If multiple tables are used, this method will add any new rows to the test data
|
void |
assumptionViolated(String message) |
void |
exampleFinished()
An example has finished.
|
void |
exampleStarted(Map<String,String> data)
A new example has just started.
|
protected org.slf4j.Logger |
getLogger() |
void |
lastStepFailed(StepFailure failure)
Declare that a step has failed after it has finished.
|
void |
notifyScreenChange() |
void |
skippedStepStarted(ExecutedStepDescription description)
Called when a test step is about to be started, but this step is scheduled to be skipped.
|
void |
stepFailed(StepFailure failure)
Called when a test step fails.
|
void |
stepFinished()
Called when an test step has finished successfully
|
void |
stepIgnored()
Called when a step will not be run, generally because a test method is annotated
with
org.junit.Ignore. |
void |
stepPending()
The step is marked as pending.
|
void |
stepPending(String message)
The step is marked as pending with a descriptive message.
|
void |
stepStarted(ExecutedStepDescription description)
Called when a test step is about to be started.
|
void |
testAborted()
The test as a whole was aborted.
|
void |
testFailed(TestOutcome testOutcome,
Throwable cause)
The test failed, but not while executing a step.
|
void |
testFinished(TestOutcome result)
Called when a test finishes.
|
void |
testFinished(TestOutcome result,
boolean isInDataDrivenTest) |
void |
testIgnored()
The test as a whole was ignored.
|
void |
testIsManual() |
void |
testPending()
The test as a whole should be marked as 'pending'.
|
void |
testRetried()
The last test run is about to be restarted
|
void |
testRunFinished() |
void |
testSkipped()
The test as a whole was skipped.
|
void |
testStarted(String description)
A test with a given name has started.
|
void |
testStarted(String description,
String id) |
void |
testSuiteFinished()
End of a test case or story.
|
void |
testSuiteStarted(Class<?> storyClass)
Start a test run using a test case or a user story.
|
void |
testSuiteStarted(Story story)
Start a test run using a specific story, without a corresponding Java class.
|
void |
useExamplesFrom(DataTable table)
The current scenario is a data-driven scenario using test data from the specified table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexampleStartedpublic static final String SERENITY_BIG_BANNER
public static final String SERENITY_SMALL_BANNER
public static final String SERENITY_NONE_BANNER
public ConsoleLoggingListener(EnvironmentVariables environmentVariables, org.slf4j.Logger logger)
@Inject public ConsoleLoggingListener(EnvironmentVariables environmentVariables)
protected org.slf4j.Logger getLogger()
public void testSuiteStarted(Class<?> storyClass)
StepListenertestSuiteStarted in interface StepListenerpublic void testSuiteStarted(Story story)
StepListenertestSuiteStarted in interface StepListenerpublic void testSuiteFinished()
StepListenertestSuiteFinished in interface StepListenerpublic void testStarted(String description)
StepListenertestStarted in interface StepListenerpublic void testStarted(String description, String id)
testStarted in interface StepListenerpublic void testFinished(TestOutcome result)
StepListenertestFinished in interface StepListenerpublic void testFinished(TestOutcome result, boolean isInDataDrivenTest)
testFinished in interface StepListenerpublic void testRetried()
StepListenertestRetried in interface StepListenerpublic void stepStarted(ExecutedStepDescription description)
StepListenerstepStarted in interface StepListenerdescription - the description of the test that is about to be run
(generally a class and method name)public void skippedStepStarted(ExecutedStepDescription description)
StepListenerskippedStepStarted in interface StepListenerdescription - the description of the test that is about to be run
(generally a class and method name)public void stepFinished()
StepListenerstepFinished in interface StepListenerpublic void stepFailed(StepFailure failure)
StepListenerstepFailed in interface StepListenerfailure - describes the test that failed and the exception that was thrownpublic void lastStepFailed(StepFailure failure)
StepListenerlastStepFailed in interface StepListenerpublic void stepIgnored()
StepListenerorg.junit.Ignore.stepIgnored in interface StepListenerpublic void stepPending()
StepListenerstepPending in interface StepListenerpublic void stepPending(String message)
StepListenerstepPending in interface StepListenerpublic void testFailed(TestOutcome testOutcome, Throwable cause)
StepListenertestFailed in interface StepListenertestOutcome - The test outcome structure for the failing testcause - The exception that triggered the failurepublic void testIgnored()
StepListenertestIgnored in interface StepListenerpublic void testSkipped()
StepListenertestSkipped in interface StepListenerpublic void testAborted()
StepListenertestAborted in interface StepListenerpublic void testPending()
StepListenertestPending in interface StepListenerpublic void testIsManual()
testIsManual in interface StepListenerpublic void notifyScreenChange()
notifyScreenChange in interface StepListenerpublic void useExamplesFrom(DataTable table)
StepListeneruseExamplesFrom in interface StepListenerpublic void addNewExamplesFrom(DataTable table)
StepListeneraddNewExamplesFrom in interface StepListenerpublic void exampleStarted(Map<String,String> data)
StepListenerexampleStarted in interface StepListenerpublic void exampleFinished()
StepListenerexampleFinished in interface StepListenerpublic void assumptionViolated(String message)
assumptionViolated in interface StepListenerpublic void testRunFinished()
testRunFinished in interface StepListenerCopyright © 2022. All rights reserved.