- Published on
JBehave Execution Listener
- Authors
- Name
- Bharath
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
- Execution -> JBehaveExecution.getExecution
- Story -> JBehaveExecution.getStory
- Scenario -> JBehaveExecution.getScenario
- Step -> JBehaveExecution.getStep
Using these entities build your custom reporter with ease.