helmethair-co/scalatest-junit-runner

Wrong JUnit reporting makes failed test to be treaded as passing

jotel opened this issue · 8 comments

jotel commented

Describe the bug
When test suite fail in lifecycle methods e.g. before/after these failures are ignored and not reported properly back to JUnit which makes a dangerous situation when failed tests are actually treated as passing

To Reproduce
Steps to reproduce the behavior:

  1. clone https://github.com/jotel/aborted-tetsts-example
  2. run ./gradlew check
  3. Build is successful, but it should not be

Expected behavior

The build should fail and all suites should be present in build/test-results/test/

Screenshots
There are four suites and five tests in the sample build but only two of both of them are reported.

Screenshot 2020-06-03 at 10 50 44

Additional context
Also ignored test in FunSuite marked ignore(...) are not properly reported as disabled.

At first, it seems to me, that runner reports an "aborted" test to JUnit, but that somehow does not make the suite fail.

I also think that is the reason. Thank you!

jotel commented

Hi @giurim, thanks for the fix... is the release with the change going to be published soon?

The central repository manager was prettyslow yesterday and it still gives weird errors. I try to figure out and push the release asap.

I will setup a JCenter account and try to release there

Hi @jotel,

Thank you for the patience. You can access 0.1.5 on jcenter/bintray. I was still not able to figure out what happened to maven central but it should eventually sync there as well.

Hi @jotel, it is synced to maven central