The more detailed reports output is found in target/jbehave/view/reports.html

The reports count is meant just as a summary, using the stats information collected, and if we tried to put more info it would rapidly become difficult to manage and/or read.

If you want more verbose output of failure, set the verboseFailure flag in the EmbedderControls, e.g.:

configuredEmbedder().embedderControls().doVerboseFailures(true);

This gives you stack traces of failures in the outputs (including console - if configured).

If you want a console output of the reports - which currently are only written to files, because the contain links to other files with the individual stories - then it's a bit more complicated.

One way would be to use something like HtmlUnit to convert HTML to text:

HtmlPage page = new WebClient().getPage("file:///.../target/jbehave/view/reports.html");
        System.out.println(page.asText());

which produces something like (though I'm not sure how readable this is):

JBehave Reports
Story Reports
Stories    Scenarios    GivenStory Scenarios    Steps
Name Excluded Total Successful Pending Failed Excluded Total Successful Pending Failed Excluded Total Successful Pending Failed Not Performed Ignorable Duration (hh:mm:ss.SSS) View After Scenario Outcome 0 2 1 0 1 0 0 0 0 0 0 4 3 0 1 0 0 00:00:00.006 stats |xml |html |txt AfterStories 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00:00:00.000 stats |xml |txt And Step 0 2 2 1 0 0 0 0 0 0 0 11 5 1 0 0 5 00:00:00.007 stats |xml |html |txt BeforeStories 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00:00:00.000 stats |xml |txt Claims With Null Calendar 0 1 1 0 0 0 0 0 0 0 0 4 4 0 0 0 0 00:00:00.006 stats |xml |html |txt Do Nothing 0 1 1 0 0 0 0 0 0 0 0 3 1 0 0 0 2 00:00:00.004 stats |xml |html |txt Examples Table Loaded From Classpath 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00:00:00.000 stats |xml |txt Failing After Stories 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00:00:00.000 stats |xml |html |txt Failing Before After 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00:00:00.000 stats |xml |txt 39 0 45 39 20 6 0 0 0 0 0 0 136 54 46 10 13 13 00:00:00.516 Totals
Generated on 03/08/2012 10:18:03
JBehave © 2003-2011

Alternatively you could modify your reports FTL template to produce the format (and the information) you want.

Cheers

On 03/08/2012 01:12, Sheldon wrote:
When my maven build fails on a JBehave test, I see the following output:

[ERROR] Failed to execute goal org.jbehave:jbehave-maven plugin:3.5.3:run-stories-as-embeddables (run-stories-in-test-scope) on project acceptance-tests: Failed to run stories as embeddables: Failures in running embeddable stories.My_Stories: Failures in running stories: ReportsCount[stories=3,storiesNotAllowed=0,storiesPending=1,scenarios=1,scenariosFailed=0,scenariosNotAllowed=0,scenariosPending=1,stepsFailed=1] -> [Help 1]

I can scroll-up my terminal window to find the scenario that failed, but as the number of scenarios increases, it becomes more painful to find the failure by eye.

It would be helpful if the ReportsCount could be formatted for easier reading and the string include the titles of the scenarios and steps that failed.

Any idea how this could be done?


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to