
io.cucumber.htmlformatter.Main Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of html-formatter Show documentation
Show all versions of html-formatter Show documentation
Renders Cucumber Messages as HTML
package io.cucumber.htmlformatter;
import io.cucumber.messages.Messages;
import io.cucumber.messages.NdjsonToMessageIterable;
import java.io.OutputStreamWriter;
import static java.nio.charset.StandardCharsets.UTF_8;
public class Main {
public static void main(String[] args) {
OutputStreamWriter writer = new OutputStreamWriter(System.out, UTF_8);
NdjsonToMessageIterable envelopes = new NdjsonToMessageIterable(System.in);
try (MessagesToHtmlWriter htmlWriter = new MessagesToHtmlWriter(writer)) {
for (Messages.Envelope envelope : envelopes) {
htmlWriter.write(envelope);
}
} catch (Throwable e) {
// Workaround for https://github.com/mojohaus/exec-maven-plugin/issues/141
e.printStackTrace();
System.exit(1);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy