-
Notifications
You must be signed in to change notification settings - Fork 714
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
Ignored steps in slim are not counted; Junit reports ignored test pages as passed #1269
Comments
Sometimes test pages are created that have no assertions intentionally (e.g. they only use a script table to Would it not be better to count the page (e.g. suite setup throwing the exception) as a failure/error and using that to fail the suite, instead of marking other pages as failures? I believe that would also make troubleshooting easier, more clear, as the page that encountered the error is marked as failed and the others as ignored. |
Actually, that's why I added the count for ignored steps. A show would not count as ignored, so these would still be reported as passed. |
And a check with an empty last column effectively turning the row into a show (I believe those are also rendered as 'ignored')? Just to make sure I understand the current behaviour: is the SuiteSetUp throwing the exception reported as error (or failed). That seems the most important to me and that should make the whole suite/run be reported as failed. |
You're right. A check with an empty expectation counts as an ignore.. :( |
Observed behaviour
When running a test where some steps are not executed (i.e. when a StopTestException is thrown), Slim reports these steps as ignored, resulting in 'Test not run' in a span with class 'ignore'.
The ignore count, however is always 0.
When running such tests through Junit, these tests are always reported as passed. Even if nothing was executed, this happens if a SuiteSetUp throws a stoptestexception (0 asserts, 0 exceptions, but ignored steps).
Expected behaviour
If steps are ignored, I'd expect the ignored count to be updated.
If the Junit runner encounters a test with no exceptions, assertions o failures, but skipped steps, I's expect the test to be reported as failed (ideally: ignored, but this currently seems hard/impossible to implement in a sustainable matter because we cannot determine that the test is ignored before starting it. That means testStarted has been fired and most listeners will expect a testFinished, that in the current situation marks the test as passed if no failure was fired.
Proposed solution
See: #1270
The text was updated successfully, but these errors were encountered: