CrossReference not creating givenStories hierarchy in xref.json

Description

Problem:
The reportbuilder doesn't create html pages for givenStories.
Crossreference xref.json file only output the information of the GivenStory and not the main story.

It only happens when having givenStories within a story file and CrossReference.
Without givenStories, it shows correctly.

For example:

  • Story file: test.story

Scenario: Test

GivenStories: another_test.story
Then check something

------------------

In cofiguration class, I have:

.
.
.
CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(640, 120);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext,
crossReference.getStepMonitor());
Format [] formats = new Format[] {new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML};
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)).withFailureTrace(false)
.withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
@Override
public Configuration configuration() {
return new SeleniumConfiguration()
.useSeleniumContext(seleniumContext)
.useWebDriverProvider(driverProvider)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
.useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(embeddableClass.getClassLoader()))
.usePathCalculator(new RelativePathCalculator())
.useStoryReporterBuilder(reporterBuilder);
}
.
.
.

-------------

  • target/jbehave/view: (it doesn't create a path.to.another_story.html page for the givenStory another_story.story)

.
.
.
afterstories.html
afterstories.stats.html
beforestories.html
index.html
beforestories.stats.html
path.to.test.html
path.to.test.stats.html
navigator.html
reports.html
xref.json

--------------

  • inside xref.json: It has the information ONLY of the given story (another_test.story) It means that Story Navigator ONLY show the givenStory.
    Also, as the given story doesn't have an html page, it shows the broken link.

{"xref": {
"whenMade": 1334236006069,
"createdBy": "JBehave",
"metaFilter": "",
"meta": [
"project=basicUI"
],
"stories": [
{
"description": "",
"narrative": "In order to test PlanMill instance {excerpt}\u000aAs a user\u000aI want to login with my credentials\u000a",
"name": "BDD Login to PlanMill instance.story",
"path": "path/to/another_test.story",
"html": "path.to.another_test.html",
"meta": "project=basicUI\u000a",
"scenarios": "Scenario:Test....",
"passed": true,
"started": 1334235999102,
"duration": 5848
}
],
.
.
.

Assignee

Paul Hammant

Reporter

Ivan Verdezoto

Labels

None

Components

Fix versions

Priority

Major
Configure