StoryNavigator is a project spun out of JBehave to show a list of stories in a web-page as well as a list of step combinations. It allows searching for stories based on a keyword, string, or meta-tag.

story navigator scn shot

Play with a live version here. Be sure to reorder columns, click on rows, enter things in the filter fields. See the source here.

There are three stories. They are copied from JBehave+Selenium 2.0 tutorial, and one was forced to fail, so that you can see the screenshot taken for that failure. If you were deploying your own StoryNavigator, you would be doing it without the data that’s been added for this live demo (read on).

The app relies on pre-built JSON data cross referencing all the JBehave stories/scenarios/steps that is the product of run of the stories (a build). Other than that it is a 100% client-side app by virtue of the excellent Angular-JS. That means that your CI build pipeline - go ThoughtWorks’ Go! - can made one StoryNavigator per build job that runs JBehave tests. To see how we build the data we loaded into the live demo above, find use of ‘CrossReference’ in this JBehave ‘Stories class.

To use in your own JBehave based Maven project, get the zip of StoryNavigator 1.0 and unzip it into src/main/stroynavigator. Perhaps a later version might be better. The add this to your Maven pom:

<build>    
  ...    
  <resources>      
    ...    
    <resources>  
      <directory>$‌{basedir}/src/main/storynavigator</directory>        
      <targetPath>$‌{project.build.directory}/jbehave/view</targetPath>        
      <filtering>false</filtering>      
    </resource>      
    ...    
  </resources>    
  ...  
</build>

Credits

Jeff had the idea. Richard made the first prototypes at Dallas GeekNight. Frank has done the styling. Miško gave us newbie pointer. I’m PM and grunt developer I guess.

We hope we can get this working for Cucumber too :)