That's what the StoryReporter does.

In particular, StoryReporter.successful(String step) will provide you the successful step that's just been executed.

Have a look at CustomHtmlOutput in the jbehave-core-example for an example of how to setup a custom reporter.

Cheers

On 07/06/2013 21:20, Jie Zhang wrote:
Hi Mauro,

   I got a mission to finish by using JBehave.

Do you know how I can get the "step" 's name (its context/text) so I can print it. Eg:

*Given I goto 'www.google.com <http://www.google.com/>'*

So what I want is I can get the "*I goto 'www.google.com <http://www.google.com/>'*" text value, so I can print it.

Is there a JBehave API, class, method that we can use to do this task?

     Thank you and very appreciated if you can help me out!

Brian

Reply via email to