JBehave
  1. JBehave
  2. JBEHAVE-811

FailingUponPendingStep strategy not honoured

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The only time the story fails is if the final example parameterised scenario fails. I'll try and work on a test case/patch...

        Activity

        Hide
        James Shaw added a comment - - edited

        This is happening because PerformableTree.performCancellable(RunContext, Story) checks context.failureOccurred() which looks at the context State. If the final example succeeded, this state is FineSoFar, even though previous examples failed.

        I'm afraid I don't know enough to patch this one myself

        Show
        James Shaw added a comment - - edited This is happening because PerformableTree.performCancellable(RunContext, Story) checks context.failureOccurred() which looks at the context State. If the final example succeeded, this state is FineSoFar, even though previous examples failed. I'm afraid I don't know enough to patch this one myself
        Mauro Talevi made changes -
        Field Original Value New Value
        Assignee Mauro Talevi [ maurotalevi ]
        Fix Version/s 4.0 [ 18486 ]
        Mauro Talevi made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Mauro Talevi added a comment -

        By default the state is reset before each scenario, but if you can override the default behaviour by

        Configuration.storyControl().doResetStateBeforeScenario(true)
        

        Then the story will fail.

        Show
        Mauro Talevi added a comment - By default the state is reset before each scenario, but if you can override the default behaviour by Configuration.storyControl().doResetStateBeforeScenario( true ) Then the story will fail.
        Hide
        Mauro Talevi added a comment -

        Can you please verify if this configuration change will give you the desired behaviour?

        Show
        Mauro Talevi added a comment - Can you please verify if this configuration change will give you the desired behaviour?
        Hide
        James Shaw added a comment -

        I'm away for a couple of weeks, but I'll give it a go when I'm back.

        Show
        James Shaw added a comment - I'm away for a couple of weeks, but I'll give it a go when I'm back.
        Hide
        Mauro Talevi added a comment -

        Could you please confirm if the configuration change work for you?

        Show
        Mauro Talevi added a comment - Could you please confirm if the configuration change work for you?
        Hide
        James Shaw added a comment -

        Sorry for not getting back to you sooner. I'll try and find some time to check this next week.

        Show
        James Shaw added a comment - Sorry for not getting back to you sooner. I'll try and find some time to check this next week.
        Hide
        Adam Londero added a comment -

        Mauro, I'm taking a look at this issue for James at the moment.
        I changed the setting to false (I assume that is what you meant above?), and it now looks like that failures fail the story as expected. However, a pending scenario amongst successful scenarios doesn't fail the story. We are using the FailingUponPendingStep strategy which is working for us using 3.6.6.
        Any thoughts?

        Show
        Adam Londero added a comment - Mauro, I'm taking a look at this issue for James at the moment. I changed the setting to false (I assume that is what you meant above?), and it now looks like that failures fail the story as expected. However, a pending scenario amongst successful scenarios doesn't fail the story. We are using the FailingUponPendingStep strategy which is working for us using 3.6.6. Any thoughts?
        Hide
        Mauro Talevi added a comment -

        It's indeed a regression. I'll update this issue accordingly to track it.

        Show
        Mauro Talevi added a comment - It's indeed a regression. I'll update this issue accordingly to track it.
        Mauro Talevi made changes -
        Summary Story succeeds even though a parameterised scenario fails FailingUponPendingStep strategy not honoured
        Affects Version/s 4.0 [ 18486 ]
        Affects Version/s 4.x [ 18279 ]
        Mauro Talevi made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            James Shaw
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: