Skip to content

tumbarumba/jbehave-specification-report

Repository files navigation

JBehave Specification Report

Builds a single page report of all JBehave stories.

To use, add the following dependency:

Maven:

<dependency>
  <groupId>com.exubero.jbehave</groupId>
  <artifactId>jbehave-specification-report</artifactId>
  <version>0.9.0</version>
</dependency>

Gradle:

dependencies {
    ...
    testCompile 'com.exubero.jbehave:jbehave-specification-report:0.9.0'
}

The report can be run as follows:

import static com.exubero.jbehave.specification.JBehaveSpecificationBuilder.aSpecificationBuilderWithSteps;

public class CreateSpecification {
    public static final void main(String[] args) {
        StorySteps storySteps = new StorySteps();
        aSpecificationBuilderWithSteps(storySteps)
            .withSpecificationTitle("Example Specifications")
            .run();
    }
}

This will run all resources matching the path spec **/*.story in the same location at the StorySteps class.

See SpecificationViewGeneratorTest for an example of how this looks in working code.

Here is an example of the generated report:

Example JBehave Specification Report