Story Mapping

The meta filtering can be used to create Story Maps, where each meta filter maps to a subset of stories, based on the meta properties that are set in the stories.

Story mapping requires as inputs the stories to map and the filters to maps against. As usual, JBehave allows multiple equivalent ways of mapping stories:

  • as embeddables: extending JUnitStoryMaps and specifying the meta filter and story paths. Extending JUnitStoryMaps allows us to configure the underlying Embedder, e.g. to specify the code location in the story reporter builder to ensure the report get written to the correct output directory (important when running multi-module builds).
  • as paths: once we have specified an instance of an Embedder, with its meta filters, we map stories specified by paths.

A concrete example of the embeddable route woud be:

Both Embedder methods are accessible via Ant tasks or Maven goals.

The resulting output uses a Swim Lane view to display the results of the mapping, with one lane per meta filter.

The maps view is by default available in the target/jbehave/view/maps.html.

It is important to note that the story mapping execution needs to be necessarily separate from the story running, since the use the meta filters in fundamentally different ways. In story mapping, the filters are kept disjoint and stories mapped against each one of them separately. In story running, the filters are joined and stories are run against the joined filter. Still, the maps and executions provide complementary views and should be run one after the other. This is why they are collected under the views index page (target/jbehave/view/index.html).