JBehave
  1. JBehave
  2. JBEHAVE-441

@BeforeScenario not called one per 'Examples' permutation.

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Could @BeforeScenario be enhanced:

      @BeforeScenario(BEFORE_EXAMPLES_PERMUTATIONS_TOO)

      or could we have a new annotation:

      @BeforeExamples

      There is some feeling that this used to work in JB 3.0. Refer bug.zip attached

      • Paul on behalf of Bill

        Activity

        Paul Hammant made changes -
        Field Original Value New Value
        Attachment bug.zip [ 53925 ]
        Description Could @BeforeScenario be enhanced:

            @BeforeScenario(BEFORE_EXAMPLES_PERMUTATIONS_TOO)

        or could we have a new annotation:

            @BeforeExamples

        There is some feeling that this used to work in JB 3.0

        - Paul on behalf of Bill
        Could @BeforeScenario be enhanced:

            @BeforeScenario(BEFORE_EXAMPLES_PERMUTATIONS_TOO)

        or could we have a new annotation:

            @BeforeExamples

        There is some feeling that this used to work in JB 3.0. Refer bug.zip attached

        - Paul on behalf of Bill
        Hide
        Mauro Talevi added a comment -

        Before and After scenario steps are executed before each scenario, provided the configuration.storyControls().skipBeforeAndAfterScenarioStepsIfGivenStory() is not true.

        Show
        Mauro Talevi added a comment - Before and After scenario steps are executed before each scenario, provided the configuration.storyControls().skipBeforeAndAfterScenarioStepsIfGivenStory() is not true.
        Hide
        Yuriy Mann added a comment -

        I confirm that @BeforeScenario was called before every example in 3.1. Which seems to be natural: each example is just an instance of a scenario with specific parameters. It also makes the code written for 3.1 incompatible with 3.3.

        In 3.3, to perform a test setup before each example we now need to invent "artificial" steps which have no meaning for a business person working with the same BDD tests.

        Show
        Yuriy Mann added a comment - I confirm that @BeforeScenario was called before every example in 3.1. Which seems to be natural: each example is just an instance of a scenario with specific parameters. It also makes the code written for 3.1 incompatible with 3.3. In 3.3, to perform a test setup before each example we now need to invent "artificial" steps which have no meaning for a business person working with the same BDD tests.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Hammant
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: