cucumber/cucumber-jvm — Issue #168: Exceptions in background steps do not cause test to fail
Author: tristanmccarthy
Created: 2012-01-23 10:30:23+00:00
State: open

I am using Cucumber-jvm 1.0.0.RC11 and having a problem using background steps.
When an exception is thrown by a step within the background section, later steps are correctly skipped but the error count is not incremented, resulting in the test being considered a success.
Running using jUnit through Maven (though the issue is also evident when running tests via Eclipse).

My feature file contains:
Background section with 4 steps.
1 scenario with 3 steps

With the 4th background step throwing an exception;
======Expected Output======
Test run count of 4
Test failure count of 0
Test error count of 1
Test skipped count of 3
Build is considered a Failure.

======Actual Output======
Test run count of 4
Test failure count of 0
Test failure count of 0
Test skipped count of 3
Build is considered a success.