Package io.cucumber.junitxmlformatter
Class MessagesToJunitXmlWriter
- java.lang.Object
-
- io.cucumber.junitxmlformatter.MessagesToJunitXmlWriter
-
- All Implemented Interfaces:
AutoCloseable
public class MessagesToJunitXmlWriter extends Object implements AutoCloseable
Writes the message output of a test run as single page xml report.Note: Messages are first collected and only written once the stream is closed.
- See Also:
- Cucumber JUnit XML Formatter - README.md
-
-
Constructor Summary
Constructors Constructor Description MessagesToJunitXmlWriter(io.cucumber.query.NamingStrategy.ExampleName exampleNameStrategy, OutputStream out)MessagesToJunitXmlWriter(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stream, flushing it first.voidwrite(io.cucumber.messages.types.Envelope envelope)Writes a cucumber message to the xml output.
-
-
-
Constructor Detail
-
MessagesToJunitXmlWriter
public MessagesToJunitXmlWriter(OutputStream out)
-
MessagesToJunitXmlWriter
public MessagesToJunitXmlWriter(io.cucumber.query.NamingStrategy.ExampleName exampleNameStrategy, OutputStream out)
-
-
Method Detail
-
write
public void write(io.cucumber.messages.types.Envelope envelope) throws IOExceptionWrites a cucumber message to the xml output.- Parameters:
envelope- the message- Throws:
IOException- if an IO error occurs
-
close
public void close() throws IOExceptionCloses 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
-
-