Search code examples
jbehave

JBehave Sentance "API" Generator available


I'm trying to provide my QA team a list of available sentences in JBehave based on methods annotated with Given, When, Then, and Alias. As follows:

  1. Then $userName is logged in.
  2. Then user should be taken to the "$pageTitle"

I recently wrote a simple script to do this. Before I put more work into it I wanted to be sure there wasn't something better out there.


Solution

  • For one there is the Eclipse integration for JBehave, which offers code completion, thus providing all steps directly from the code ( http://jbehave.org/eclipse-integration.html ). Note that it doesn't go through dependent .jars though - only what it can find in the source tree. i.e, enter "Given", hit Ctrl+Space and get all the available given steps.

    But there has also been some work parsing the run results with a "Story Navigator" ( http://paulhammant.com/blog/introducing-story-navigator.html ), which offers a listing of the steps. But I'm not sure whether it can list unused steps; Furthermore this one seems more like a proof of concept to me (I wasn't able to make proper use of it).