JBehave
  1. JBehave
  2. JBEHAVE-399

Count scenarios in a story separately from those in the GivenStories.

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.2
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      PostStoryStatisticsCollector should be counting scenarios in a story considering whether it's a givenStory or not. It should be displaying the number of scenarios executed in the story, not including int the count those executed in the GivenStories.

        Activity

        Hide
        Daniel Godfrey added a comment -

        I've pushed to patches onto github for this, on my master branch
        https://github.com/dgodfrey/jbehave-core/commits/master

        Show
        Daniel Godfrey added a comment - I've pushed to patches onto github for this, on my master branch https://github.com/dgodfrey/jbehave-core/commits/master
        Hide
        Daniel Godfrey added a comment -

        I've rearranged my fork a little. The patch for this is now in it's own branch, to aid in merging/pulling.
        https://github.com/dgodfrey/jbehave-core/tree/jbehave_399

        Show
        Daniel Godfrey added a comment - I've rearranged my fork a little. The patch for this is now in it's own branch, to aid in merging/pulling. https://github.com/dgodfrey/jbehave-core/tree/jbehave_399
        Mauro Talevi made changes -
        Field Original Value New Value
        Summary Reports contain incorrect data with multiple scenarios in one story when using GivenStories. Count scenarios in a story separately from those in the GivenStories.
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 3.2 [ 16757 ]
        Description This is because PostStoryStatisticsCollector is resetting and writing the data on calls to beforeStory/afterStory irrespective of whether givenStory is set or not. It's also displaying the total number of scenarios executed, including the count from the GivenStories, rather than just the number of scenarios in the story. PostStoryStatisticsCollector should be counting scenarios in a story considering whether it's a givenStory or not. It should be displaying the number of scenarios executed in the story, not including int the count those executed in the GivenStories.

        Component/s Core [ 11086 ]
        Hide
        Mauro Talevi added a comment -

        Pull patch from branch.

        Show
        Mauro Talevi added a comment - Pull patch from branch.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mauro Talevi added a comment -

        Added event categories for the GivenStory scenarios, which are now reported separately in the views.

        Show
        Mauro Talevi added a comment - Added event categories for the GivenStory scenarios, which are now reported separately in the views.
        Hide
        Daniel Godfrey added a comment -

        I found an issue with my original fix for this where errors weren't being reported correctly, when a later "not performed" method couldn't be parameterised properly.

        Also, I found an issue with nested GivenStories in the latest master, where it was reporting incorrect scenario counts when there a GivenStory contained GivenStories.

        I've pushed fixes for both of these and a testcase for the 2nd issue to my github fork at https://github.com/dgodfrey/jbehave-core/commits/jbehave_399.

        Show
        Daniel Godfrey added a comment - I found an issue with my original fix for this where errors weren't being reported correctly, when a later "not performed" method couldn't be parameterised properly. Also, I found an issue with nested GivenStories in the latest master, where it was reporting incorrect scenario counts when there a GivenStory contained GivenStories. I've pushed fixes for both of these and a testcase for the 2nd issue to my github fork at https://github.com/dgodfrey/jbehave-core/commits/jbehave_399 .
        Hide
        Mauro Talevi added a comment -

        Dan, your branch seems outdated wrt master. It still shows the StoryReporter methods breaking backward compatibility which have been reverted in master branch. Could you please recreate branch from master and apply the changes again?

        Show
        Mauro Talevi added a comment - Dan, your branch seems outdated wrt master. It still shows the StoryReporter methods breaking backward compatibility which have been reverted in master branch. Could you please recreate branch from master and apply the changes again?
        Hide
        Daniel Godfrey added a comment -

        I merged jbehave-core/master into that branch this afternoon, so it should be up to date with your backwards compatibility changes, barring any more changes in the last 7 hours or so.

        Show
        Daniel Godfrey added a comment - I merged jbehave-core/master into that branch this afternoon, so it should be up to date with your backwards compatibility changes, barring any more changes in the last 7 hours or so.
        Hide
        Mauro Talevi added a comment -

        You're right - my remote branch was out of date. Pulled changed. Thanks.

        Show
        Mauro Talevi added a comment - You're right - my remote branch was out of date. Pulled changed. Thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel Godfrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: