JBehave
  1. JBehave
  2. JBEHAVE-993

Lifecycle steps not run before/after each Example Scenario

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9.1
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      When you have a story with:

      • At least, two scenarios
        • 1st scenario is a "normal" scenario
        • 2nd scenario is a "example" scenario
      • The story has Lifecycle steps

      For the example scenario Lifecycle steps are not run before/after each scenario.

      Check attached example (use mvn test to run the example).

        Activity

        Bernardo Oliveira Pinto made changes -
        Field Original Value New Value
        Description When you have a story with:
        * At least, two scenarios
        ** 1st scenario is a "normal" scenario
        ** 2nd scenario is a _Scenario Outline_
        * The story has a Background (aka {{Lifecycle > Before}} steps)

        For the _Scenario Outline_, Jbehave is not running the {{Lifecycle > Before}} steps and is reusing the instance variables created by the previous scenario.

        Check attached example (run {{mvn test}} to run the example).
        When you have a story with:
        * At least, two scenarios
        ** 1st scenario is a "normal" scenario
        ** 2nd scenario is a _Scenario Outline_
        * The story has a Background (aka {{Lifecycle > Before}} steps)

        For the _Scenario Outline_, Jbehave is not running the {{Lifecycle > Before}} steps and is reusing the instance variables created by the previous scenario.

        Check attached example (use {{mvn test}} to run the example).
        Mauro Talevi made changes -
        Description When you have a story with:
        * At least, two scenarios
        ** 1st scenario is a "normal" scenario
        ** 2nd scenario is a _Scenario Outline_
        * The story has a Background (aka {{Lifecycle > Before}} steps)

        For the _Scenario Outline_, Jbehave is not running the {{Lifecycle > Before}} steps and is reusing the instance variables created by the previous scenario.

        Check attached example (use {{mvn test}} to run the example).
        When you have a story with:
        * At least, two scenarios
        ** 1st scenario is a "normal" scenario
        ** 2nd scenario is a "example" scenario
        * The story has {{Lifecycle}} steps

        For the example scenario {{Lifecycle}} steps are not run before/after each scenario.

        Check attached example (use {{mvn test}} to run the example).
        Affects Version/s 3.9 [ 19035 ]
        Fix Version/s 3.9.1 [ 19830 ]
        Summary JBehave reusing instance variables in Examples Scenario Lifecycle steps not run before/after each Example Scenario
        Hide
        Mauro Talevi added a comment -

        Updated the lifecycle.story with your contributed bank account narrative.

        Show
        Mauro Talevi added a comment - Updated the lifecycle.story with your contributed bank account narrative.
        Mauro Talevi made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Bernardo Oliveira Pinto
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: