Surefire Reporter

The SurefireReporter is a special report Format that build a Surefire XML report of stories being executed during the run.

The report can then be used by any tool (typically a continuous build server) that supports the Surefire Test Report format.


The SurefireReporter instance needs to configured in the StoryReporterBuilder:

public class CoreStories extends JUnitStories {
    public Configuration configuration() {
        SurefireReporter surefireReporter = new SurefireReporter();
        return new MostUsefulConfiguration()
            .useStoryReporterBuilder(new StoryReporterBuilder()

If the SurefireReporter is configured, the XML report is generated automatically in the JBehave report view directory (target/jbehave/view by default) by the JUnit-based ConfigurableEmbedder, i.e. JUnitStory and JUnitStories. In other case, you may generate them on demand via the Embedder method generateSurefireReport().

Optionally, SurefireReporter can be configured to create a file output for each story or change the test case naming strategy via the SurefireReporter.Options.


Examples of configuration of SurefireReporter can be found in core example.