Package io.cucumber.htmlformatter
Class MessagesToHtmlWriter
java.lang.Object
io.cucumber.htmlformatter.MessagesToHtmlWriter
- All Implemented Interfaces:
AutoCloseable
Writes the message output of a test run as single page html report.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic interfaceSerializes a message to JSON. -
Constructor Summary
ConstructorsConstructorDescriptionMessagesToHtmlWriter(OutputStream outputStream, MessagesToHtmlWriter.Serializer serializer) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessagesToHtmlWriter.Builderbuilder(MessagesToHtmlWriter.Serializer serializer) Creates a builder to construct this writer.voidclose()Closes the stream, flushing it first.voidwrite(io.cucumber.messages.types.Envelope envelope) Writes a cucumber message to the html output.
-
Constructor Details
-
MessagesToHtmlWriter
@Deprecated public MessagesToHtmlWriter(OutputStream outputStream, MessagesToHtmlWriter.Serializer serializer) throws IOException Deprecated.- Throws:
IOException
-
-
Method Details
-
write
Writes a cucumber message to the html output.- Parameters:
envelope- the message- Throws:
IOException- if an IO error occurs
-
close
Closes the stream, flushing it first. Once closed further write() invocations will cause an IOException to be thrown. Closing a closed stream has no effect.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if an IO error occurs
-
builder
Creates a builder to construct this writer.- Parameters:
serializer- used to convert messages into json.- Returns:
- a new builder
-