Package io.cucumber.core.plugin
Class PrettyFormatter
java.lang.Object
io.cucumber.core.plugin.PrettyFormatter
- All Implemented Interfaces:
ColorAware,ConcurrentEventListener,Plugin
Prints a pretty report of the scenario execution as it happens.
When scenarios are executed concurrently the output will interleave. This is to be expected.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OutputStreamprivate io.cucumber.prettyformatter.MessagesToPrettyWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static io.cucumber.prettyformatter.MessagesToPrettyWriter.BuildervoidsetEventPublisher(EventPublisher publisher) Set the event publisher.voidsetMonochrome(boolean monochrome) When set to monochrome the plugin should not use colored output.private voidwrite(io.cucumber.messages.types.Envelope event) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.cucumber.plugin.ConcurrentEventListener
setEventPublisher
-
Field Details
-
out
-
writer
private io.cucumber.prettyformatter.MessagesToPrettyWriter writer
-
-
Constructor Details
-
PrettyFormatter
-
-
Method Details
-
createBuilder
private static io.cucumber.prettyformatter.MessagesToPrettyWriter.Builder createBuilder() -
setEventPublisher
Description copied from interface:ConcurrentEventListenerSet the event publisher. The plugin can register event listeners with the publisher.- Specified by:
setEventPublisherin interfaceConcurrentEventListener- Parameters:
publisher- the event publisher
-
write
private void write(io.cucumber.messages.types.Envelope event) -
setMonochrome
public void setMonochrome(boolean monochrome) Description copied from interface:ColorAwareWhen set to monochrome the plugin should not use colored output.For the benefit of systems that do not support ANSI escape codes.
- Specified by:
setMonochromein interfaceColorAware- Parameters:
monochrome- true if monochrome output should be used
-