JBehave
  1. JBehave
  2. JBEHAVE-153

I would like to add priority to my scenarios

    Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I would like to be able to add priority to my textual scenarios and should be available to the StoryReporter. This priority is used to tell in what order the different scenarios should be implemented.

      E.g. if (in StoryReporter)
      public void beforeScenario(String title);

      is changed to
      public void beforeScenario(String title, int priority);

      The priority can be used to create a visual report (e.g. in HTML).

      The priority can also be used to raise warnings if a high priority scenario is pending, while there is activity on scenarios with less priority.

        Activity

        Hide
        Elizabeth Keogh added a comment -

        Hmm, been thinking about this myself. Wouldn't it be nice to be able to label the scenarios themselves, too? That way, we could run them either in order, or with the most recent scenarios first, depending on what we're interested in. I'm thinking of files labelled things like:

        1_5_i_can_win_the_game
        1_6_the_game_can_be_a_draw
        2_we_keep_score

        etc.

        That would also allow the scenarios to appear in a natural order in directory listing, which they don't at the moment.

        One of the things we could do is to find all files which match the scenario file pattern in a directory, then match them up to the Java class. This would let us get round some of the annoying problems I've seen with case matching, too. Our Java classes wouldn't have the numbers on the front of them, obviously; they'd just be there to wire up the text files.

        I guess it would be the JUnit runner that would have to change...?

        (BTW, the act of concentrating on high priority stories is a cultural thing. I'm very wary of putting constraints into code to concentrate effort on fixing a problem that may have an underlying root cause.)

        Show
        Elizabeth Keogh added a comment - Hmm, been thinking about this myself. Wouldn't it be nice to be able to label the scenarios themselves, too? That way, we could run them either in order, or with the most recent scenarios first, depending on what we're interested in. I'm thinking of files labelled things like: 1_5_i_can_win_the_game 1_6_the_game_can_be_a_draw 2_we_keep_score etc. That would also allow the scenarios to appear in a natural order in directory listing, which they don't at the moment. One of the things we could do is to find all files which match the scenario file pattern in a directory, then match them up to the Java class. This would let us get round some of the annoying problems I've seen with case matching, too. Our Java classes wouldn't have the numbers on the front of them, obviously; they'd just be there to wire up the text files. I guess it would be the JUnit runner that would have to change...? (BTW, the act of concentrating on high priority stories is a cultural thing. I'm very wary of putting constraints into code to concentrate effort on fixing a problem that may have an underlying root cause.)
        Hide
        Egil Østhus added a comment -

        I guess you're right that the concentrating on high priority is a cultural thing, what I'm asking is the opportunity to label the scenarios in a way that is sortable. I agree that my initial suggestion is not that generic, it's intent was to get the discussion started.

        Show
        Egil Østhus added a comment - I guess you're right that the concentrating on high priority is a cultural thing, what I'm asking is the opportunity to label the scenarios in a way that is sortable. I agree that my initial suggestion is not that generic, it's intent was to get the discussion started.
        Hide
        Mauro Talevi added a comment -

        Set component to core.

        This use case will probably be addressed by JBEHAVE-220.

        Show
        Mauro Talevi added a comment - Set component to core. This use case will probably be addressed by JBEHAVE-220 .
        Mauro Talevi made changes -
        Field Original Value New Value
        Description I would like to be able to add priority to my textual scenarios and should be available to the ScenarioReporter. This priority is used to tell in what order the different scenarios should be implemented.

        E.g. if (in ScnearioReporter)
        public void beforeScenario(String title);

        is changed to
        public void beforeScenario(String title, int priority);

        The priority can be used to create a visual report (e.g. in HTML).

        The priority can also be used to raise warnings if a high priority scenario is pending, while there is activity on scenarios with less priority.
        I would like to be able to add priority to my textual scenarios and should be available to the StoryReporter. This priority is used to tell in what order the different scenarios should be implemented.

        E.g. if (in StoryReporter)
        public void beforeScenario(String title);

        is changed to
        public void beforeScenario(String title, int priority);

        The priority can be used to create a visual report (e.g. in HTML).

        The priority can also be used to raise warnings if a high priority scenario is pending, while there is activity on scenarios with less priority.
        Component/s Core [ 11086 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Egil Østhus
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: