Details
Description
In case of story with GivenStories JBehave raport is broken. Although few scenarios has been successfully performed - "Scenarios" and "Steps" are missing. Duration is improperly set to zero.
Example of problematic story:
@author Przemyslaw Kwiecien @organization Example Organization Systems Ltd. GivenStories: com/sample/qa/stories/functionality1.story#{id06:create_something_with_rates}, com/sample/qa/stories/other.story#{id09:full_sample} Scenario: Create Something . . .
Report generated with such story is attached as "jbehaveBrokenReport.jpg".
If GivenStories is replaced by corresponding steps report is fine ("jbehaveBrokenReport-withoutGivenStories.jpg").
"jbehaveBrokenReport2.jpg" file shows more errors caused by the same problem. This time more stories were run - duration is totally broken.
I am using following JBehave versions:
<jbehave.core.version>4.0-beta-9</jbehave.core.version>
<jbehave.site.version>3.2</jbehave.site.version>
Configuration
@Override public Configuration configuration() { Class<? extends SanityEmbedder> embedderClass = this.getClass(); ParameterConverters parameterConverters = new ParameterConverters(); ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(), new LoadFromClasspath(embedderClass), parameterConverters); parameterConverters.addConverters(new ParameterConverters.DateConverter(new SimpleDateFormat("yyyy-MM-dd")), new ParameterConverters.ExamplesTableConverter(examplesTableFactory), new ParameterConverters.BooleanConverter("true", "false")); return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(embedderClass.getClassLoader())) .useStoryParser(new RegexStoryParser(examplesTableFactory)) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass)) .withDefaultFormats() .withFormats(CONSOLE, TXT, HTML, XML) .withCrossReference(new CrossReference()) .withFailureTrace(true) .withFailureTraceCompression(false)) .useParameterConverters(parameterConverters) // use custom date pattern .useStepPatternParser(new RegexPrefixCapturingPatternParser( "$")) // use '%' instead of '$' to identify parameters - this little devil is optional .useStepMonitor(new SilentStepMonitor()) .useParameterConverters(parameterConverters); }
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Resolution | Fixed [ 1 ] | |
Fix Version/s | 4.0 [ 18486 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Rather than providing a set of morsels of code and configuration, it'd be much easier if you could provide a simple Maven sample project that reproduced this behaviour.