JBehave
  1. JBehave
  2. JBEHAVE-846

Allow meta filtering on example scenarios

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.3, 3.8
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      As suggested by Pascal Rapicault on user list, allow filtering of examples scenarios by adding a column for the meta info:

      Meta: @run
      
      Given I do use <Parameter>
      
      Examples: 
      |Meta:|Parameter|
      |@run yes|value|
      |@run not|value|
      

      For each example scenario, i.e. for each row of the Examples table, the meta specified will be matched against the meta filter provided and if allowed the scenario will be run.

      NOTE: the meta filter provider is unique for the run, so the meta info must be able to match both the scenario or story. In the example above, the Meta @run is specified to allow it be matched by any value of the meta filter that specifies a @run value.

      If specifying meta filter '+run yes' only the first example will be run, while specifying '+run not' only the second will be run.

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Pascal Rapicault added a comment -

        I see the bug as "in progress". Are you actively working on it or do you want me to look into a patch?

        Show
        Pascal Rapicault added a comment - I see the bug as "in progress". Are you actively working on it or do you want me to look into a patch?
        Mauro Talevi made changes -
        Description As suggested by Pascal Rapicault on user list, allow filtering of examples scenarios by adding a column for the meta info:

        {code}
        Meta: @run

        Given I do use <Parameter>

        Examples:
        |Meta:|Parameter|
        |@run yes|value|
        |@run not|value|
        {code}

        For each example scenario, i.e. for each row of the Examples table, the meta specified will be matched against the meta filter provided and if allowed the scenario will be run.

        NOTE: the meta filter provider is unique for the run, so the meta info must be able to match both the scenario or story. In the example above, the ,eta @run is specified to allow it be matched by any value of the meta filter that specifies a @run value.

        If specifying meta filter '+run yes' only the first example will be run, while specifying '+run not' only the second will be run.
          
        As suggested by Pascal Rapicault on user list, allow filtering of examples scenarios by adding a column for the meta info:

        {code}
        Meta: @run

        Given I do use <Parameter>

        Examples:
        |Meta:|Parameter|
        |@run yes|value|
        |@run not|value|
        {code}

        For each example scenario, i.e. for each row of the Examples table, the meta specified will be matched against the meta filter provided and if allowed the scenario will be run.

        NOTE: the meta filter provider is unique for the run, so the meta info must be able to match both the scenario or story. In the example above, the Meta @run is specified to allow it be matched by any value of the meta filter that specifies a @run value.

        If specifying meta filter '+run yes' only the first example will be run, while specifying '+run not' only the second will be run.
          
        Hide
        Mauro Talevi added a comment -

        Implementation is complete and a 3.8-SNAPSHOT has been deployed. Please test snapshot to verify it meets your needs.

        Show
        Mauro Talevi added a comment - Implementation is complete and a 3.8-SNAPSHOT has been deployed. Please test snapshot to verify it meets your needs.
        Hide
        Pascal Rapicault added a comment -

        I've tested and it worked as expected.
        Thx for the quick response.

        When you are planning on cutting a release?

        Show
        Pascal Rapicault added a comment - I've tested and it worked as expected. Thx for the quick response. When you are planning on cutting a release?
        Hide
        Mauro Talevi added a comment -

        It'll be released this week.

        Show
        Mauro Talevi added a comment - It'll be released this week.
        Mauro Talevi made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mauro Talevi added a comment -

        JBehave 3.7.3 is out.

        Show
        Mauro Talevi added a comment - JBehave 3.7.3 is out.
        Mauro Talevi made changes -
        Fix Version/s 3.8 [ 19104 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: