Failing Scenarios are Reported as Successfull
---------------------------------------------

                 Key: JBEHAVE-407
                 URL: http://jira.codehaus.org/browse/JBEHAVE-407
             Project: JBehave
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.2
         Environment: Win XP
            Reporter: Patrick McFadden


We noticed that methods annotated with @AfterScenario(uponOutcome=FAILURE) were 
not being triggered properly after a scenario failed.  Upon further inspection, 
we see that the Failure is reported by the failing step. It is then ignored by 
the "After" methods, which report success.  The following scenario is run 
(although it should be skipped).  The report at the bottom correctly states 
that the story failed.

Sample Output from one of the Trader Examples:

Running story 
org/jbehave/examples/trader/stories/skip_scenarios_after_failure.story

(org/jbehave/examples/trader/stories/skip_scenarios_after_failure.story)
Before Story ...
Scenario: A scenario with failed step
Before Scenario ...
Given I do nothing
Then I fail (FAILED)
(junit.framework.AssertionFailedError: I failed!)
After Any Scenario ...
After Successful Scenario ...

Scenario: A scenario that is not executed because if followed a failed scenario
Before Scenario ...
Given I do nothing
After Any Scenario ...
After Successful Scenario ...

 ... Browser has been put to rest 


After Story ...

Failed to run story 
org/jbehave/examples/trader/stories/skip_scenarios_after_failure.story
junit.framework.AssertionFailedError: I failed!


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to