JBehave
  1. JBehave
  2. JBEHAVE-762

CrossReference not creating givenStories hierarchy in xref.json

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.5, 3.7
    • Component/s: Core, Navigator
    • Labels:
      None
    • Environment:
      Windows 7
      Firefox
      Java JRE6
    • Number of attachments :
      0

      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
      }
      ],
      .
      .
      .

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Assignee Paul Hammant [ paul ]
        Fix Version/s 3.6.5 [ 18453 ]
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Fix Version/s 3.7 [ 18390 ]

          People

          • Assignee:
            Paul Hammant
            Reporter:
            Ivan Verdezoto
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: