Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2286

Surefire 3.x is ignoring the result of @RunWith-based junit4 tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.0.0
    • None
    • Junit 4.x support
    • None

    Description

      While more classic junit4 tests are executed and reported fine, it seems that tests generated through a custom @RunWith are executed (some logs are produced which can only mean that those tests are indeed executed), but their result does not appear in the Surefire report.

      Problem is that it means the build never fail even if one of those tests is actually not passing, we've finally noticed it only after a while...

      Downgrading to 2.22.2 make the tests behave as expected.

      Note that those test classes are handled properly when adding org.apache.maven.surefire:surefire-junit47 to the surefire plugin's dependencies, but it causes problems with our junit 5 tests, unfortunately, and we have quite a few modules in which both versions of junit are used (in different test classes, of course).

      Attachments

        Activity

          People

            Unassigned Unassigned
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: