[ 
https://jira.codehaus.org/browse/JBEHAVE-762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mauro Talevi updated JBEHAVE-762:
---------------------------------

    Fix Version/s: 3.6.5
         Assignee: Paul Hammant
    
> CrossReference not creating givenStories hierarchy in xref.json
> ---------------------------------------------------------------
>
>                 Key: JBEHAVE-762
>                 URL: https://jira.codehaus.org/browse/JBEHAVE-762
>             Project: JBehave
>          Issue Type: Bug
>          Components: Core, Navigator
>         Environment: Windows 7
> Firefox
> Java JRE6
>            Reporter: Ivan Verdezoto
>            Assignee: Paul Hammant
>             Fix For: 3.6.5
>
>
> 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
>     }
>   ],
> .
> .
> .

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to