-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cucumber JUnit Formatter throws NPE when a Scenario has no steps #774
Comments
I'll note that it throws the NPE regardless of Doesn't seem to be related to --strict usage at all, but the JUnit formatter trying to do sums of things that don't exist. From your repo:
|
Lines starting with "It should" are not steps, so the feature file in the repo, contains a Feature with one Scenario with no steps. The NPE is caused by that the Scenario has no step, should the Scenario have unimplemented steps, there would no NPE. |
Ugh, I'm terribly sorry and ashamed that I wasted your time with such a silly thing. It is totally my fault that I wrote such a syntactically incorrect feature. Sorry again! |
Don't be sorry @bacey, the exception you got didn't explain much and your bug report helped us improve the general user experience! Cucumber should be able to give better errors rhan that on invalid input. And scenarios without steps aren't even invalid! |
Haha! I didn't even notice this! Derp. Sorry about that :| |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've created a small repo which shows the bug: https://github.com/bacey/cucumber-strict-bug
Cucumber throws a NullPointerException when running --strict on an unimplemented feature.
The command to run is:
The result of the above command:
System which was used: cucumber-jvm 1.1.8, gradle 2.0, mac.
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
The text was updated successfully, but these errors were encountered: