-
-
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
NPE while running empty scenario via AbstractTestNGCucumberTests #1885
Comments
Running via JUnit, it seems no error is thrown:
|
The empty scenario somewhat unexpectedly gets the state "Undefined". This unexpected because by definition an empty test should pass. As a result however the Now I'm guessing the So ideally we fix that and default to passed. But that will need a major release so the next best thing would be to fix the listeners. |
The `TestCaseState` defaults to undefined when a scenario has no steps. The `TestCaseResultListener` however expects there to be an undefined step. That the `TestCaseState` defaults to undefined is rather unexpected. The status should be the most severe of the states so far which means that it should default to passed. Changing this however will require a major release. So fixing the test case result listeners is the next best thing. It also appears that there is some duplication ongoing between TestNG and the JUnit Platform Engine. However this duplication is hard to fix because each platform uses its own exceptions and TestNG still supports `--non-strict`. Fixes: #1885
The `TestCaseState` defaults to undefined when a scenario has no steps. The `TestCaseResultListener` however expects there to be an undefined step. That the `TestCaseState` defaults to undefined is rather unexpected. The status should be the most severe of the states so far which means that it should default to passed. Changing this however will require a major release. So fixing the test case result listeners is the next best thing. It also appears that there is some duplication ongoing between TestNG and the JUnit Platform Engine. However this duplication is hard to fix because each platform uses its own exceptions and TestNG still supports `--non-strict`. Fixes: #1885
Steps to reproduce:
2.) Create a TestNG class for running feature from above:
Actual:
The text was updated successfully, but these errors were encountered: