-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined steps does not fail a test #16
Comments
Agreed, an option to make it fail if there are undefined steps could be useful. Cucumber allows this with the --strict flag. Adding to the 1.0 milestone. |
One hack to use this in CI/build system would be to pipe the output (or tee the output) to a file, then this: grep UNDEFINED nose.log && (echo "ERROR: Undefined found"; exit 1) |
Or simply |
That is exactly what we had to do. I wrote a Maven plugin to trigger Freshen runs for our Java apps and we had to add custom logic like that: |
Ah yes- this would work fine with a Jenkins job or in a build/deploy
On 5 January 2012 14:55, Jacek Furmankiewicz
Danny Staple Director, ODM Solutions Ltd |
See abeld@3bca046 for an implementation of the "add an option to turn undefined steps into failures" feature. (The branch is https://github.com/abeld/freshen/tree/undefined-steps-are-errors--option) |
When I created a scenario and had no steps, it gave me the UNDEFINED error in the output...but all the tests were flagged as passed and nose displayed OK at the end.
Also a 0 return code was returned from the process instead of 1 (or some error code) to indicate failure.
This means it's hard for automated builds to know if the tests actually failed or not, since a test that was not run due to undefined steps does not fail the test run.
if that is the default behavior, freshen should offer an option to override it.
The text was updated successfully, but these errors were encountered: