-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support configurable NamingStrategy.ExampleName
For example: ```java public final class MyJUnitXmlFormatter implements ConcurrentEventListener { private final MessagesToJunitXmlWriter writer; public JUnitFormatter(OutputStream out) { this.writer = new MessagesToJunitXmlWriter(NamingStrategy.ExampleName.PICKLE, out); } @OverRide public void setEventPublisher(EventPublisher publisher) { publisher.registerHandlerFor(Envelope.class, this::write); } private void write(Envelope event) { try { writer.write(event); } catch (IOException e) { throw new IllegalStateException(e); } if (event.getTestRunFinished().isPresent()) { try { writer.close(); } catch (IOException e) { throw new IllegalStateException(e); } } } } ``` Note: Cucumber-JVM at present doesn't allow much configuration of plugins. To take advantage of this new option, the class above must be copied. And can be used in Cucumber-JVM with `cucumber.plugin=com.example.MyJUnitXmlFormatter:target/report.xml`. Fixes: #27
- Loading branch information
1 parent
b389855
commit d77dd29
Showing
3 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters