Published on

JBehave Execution Listener

Authors
  • avatar
    Name
    Bharath
    Twitter

JBehaveExecution

Get information about the current Story, Scenario, Step, Examples in a thread-safe manner using JBehaveExecution

Add the ExecutionModelReporter to your configuration as below and use the methods in JBehaveExecution.

    @Override
    public Configuration configuration() {
        return new MostUsefulConfiguration()
            .useStoryPathResolver(embeddableClass -> "com/everwhimsical/jbehave/Simple.story")
            .useStoryReporterBuilder(
                new StoryReporterBuilder()
                    .withDefaultFormats()
                    .withReporters(new ExecutionModelReporter())
                    .withFormats(Format.CONSOLE));
    }

To get information about entities, use the below methods

Using these entities build your custom reporter with ease.