JBehave
  1. JBehave
  2. JBEHAVE-923

Add scenario-specific filters as anchors of GivenStories paths

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      As a story writer, I find that rather often one scenario depends on another in its Given clause.

      So I would like to use something like this

      GivenStories: path/to/story#{id:scenarioId}
      

      where "id" is the meta tag of the scenario

      Scenario: 
      
      Meta: @id scenarioId
      

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Summary Scenario-Specific Filters for GivenStories Add scenario-specific Filters for GivenStories
        Description I find that rather often one scenario depends on another in its Given clause.
        So I would like to use something like this
        GivenScenario: com/company/product/stories/feature.story#RequiredScenarioName

        But I dont think it's possible?
        While specifying required stories is possible ( http://jbehave.org/reference/stable/given-stories.html )
        And even though i found this, which im guessing is old API for GivenStories? http://jira.codehaus.org/browse/JBEHAVE-282

        Any way to make it work?

        Response:

        GivenScenario is not supported (was in 2.x) and don't really see the reason to given the support for its superset.

        What we we can add is scenario-specific filters via anchors to GivenStories paths to obtain the same effect.

        Please raise a jira issue for this.

        Cheers
        Mauro
        As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        GivenStories: path/to/story#scenarioId

        Mauro Talevi made changes -
        Summary Add scenario-specific Filters for GivenStories Add scenario-specific filters as anchors of GivenStories paths
        Description As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        GivenStories: path/to/story#scenarioId

        As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        GivenStories: path/to/story#{id:scenarioId}

        Where "id" is the meta tag of the scenario

        Scenario:

        Meta: @id scenarioId

        Mauro Talevi made changes -
        Description As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        GivenStories: path/to/story#{id:scenarioId}

        Where "id" is the meta tag of the scenario

        Scenario:

        Meta: @id scenarioId

        As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        {code}
        GivenStories: path/to/story#\{id:scenarioId\}
        {code}

        where "id" is the meta tag of the scenario

        {code}
        Scenario:

        Meta: @id scenarioId
        {code}
        Mauro Talevi made changes -
        Description As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        {code}
        GivenStories: path/to/story#\{id:scenarioId\}
        {code}

        where "id" is the meta tag of the scenario

        {code}
        Scenario:

        Meta: @id scenarioId
        {code}
        As a story writer, I find that rather often one scenario depends on another in its Given clause.

        So I would like to use something like this

        {code}
        GivenStories: path/to/story#{id:scenarioId}
        {code}

        where "id" is the meta tag of the scenario

        {code}
        Scenario:

        Meta: @id scenarioId
        {code}
        Mauro Talevi made changes -
        Fix Version/s 3.9 [ 19035 ]
        Hide
        Mauro Talevi added a comment -

        Supported more generic variant, whereby multiple scenarios can be filtered:

        GivenStories: path/to/story#{id1:scenario1;id2:scenario2}
        

        where "id1" and "id2" are meta parameters of the scenarios

        Scenario: Executed
        
        Meta: @id1 scenario1
        
        Scenario: Executed
        
        Meta: @id2 scenario2
        
        Scenario: Not executed 
        
        Meta: @id3 scenario3
        
        
        Show
        Mauro Talevi added a comment - Supported more generic variant, whereby multiple scenarios can be filtered: GivenStories: path/to/story#{id1:scenario1;id2:scenario2} where "id1" and "id2" are meta parameters of the scenarios Scenario: Executed Meta: @id1 scenario1 Scenario: Executed Meta: @id2 scenario2 Scenario: Not executed Meta: @id3 scenario3
        Mauro Talevi made changes -
        Assignee Mauro Talevi [ maurotalevi ]
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Kristjan Laane
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: