JBehave
  1. JBehave
  2. JBEHAVE-991

Meta parameters only work once per runner

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      According to http://jbehave.org/reference/stable/meta-parametrisation.html
      it should be possible to provide parameter values using the Meta: keyword.

      If two stories are using meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

      see attached example.

        Activity

        Roman Schlegel made changes -
        Field Original Value New Value
        Description According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using the meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.
        According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using the meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        Roman Schlegel made changes -
        Description According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using the meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using the meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        {code}
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        Roman Schlegel made changes -
        Description According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using the meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        {code}
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        {code}
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        Roman Schlegel made changes -
        Testcase included yes [ 10040 ]
        Hide
        Cristiano Gavião added a comment -

        please, could you add a simple configured project reproducing the issue?

        Show
        Cristiano Gavião added a comment - please, could you add a simple configured project reproducing the issue?
        Roman Schlegel made changes -
        Attachment jbehave-991.zip [ 65238 ]
        Roman Schlegel made changes -
        Description According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        story 1:
        {code}
        Meta:
         
        @theme parameters
         
        Scenario: scenario with hidden meta params
         
        Meta:
         
        @variant foo
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'parameters' with variant 'foo'
        {code}

        story 2:
        {code}
        Meta:
         
        @theme chibberchabber
         
        Scenario: scenario 2 with different hidden meta params
         
        Meta:
         
        @variant notworking
         
        Given I have some step that implicitly requires meta params
        Then the theme is 'chibberchabber' with variant 'notworking'
        {code}
        According to http://jbehave.org/reference/stable/meta-parametrisation.html
        it should be possible to provide parameter values using the Meta: keyword.

        If two stories are using meta keywords with the same name but different values, one story will fail because the meta parameter is initialized only once per runner.

        see attached example.
        Hide
        Roman Schlegel added a comment - - edited

        the configured project is jbehave-4.0-SNAPSHOT\examples\core

        Just copy the example stories to
        jbehave-4.0-SNAPSHOT\examples\core\src\main\java\org\jbehave\examples\core\stories

        Show
        Roman Schlegel added a comment - - edited the configured project is jbehave-4.0-SNAPSHOT\examples\core Just copy the example stories to jbehave-4.0-SNAPSHOT\examples\core\src\main\java\org\jbehave\examples\core\stories

          People

          • Assignee:
            Unassigned
            Reporter:
            Roman Schlegel
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: