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

failIfNoTests config option to fail when no tests are found (in a given module)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-M6
    • None
    • Maven Surefire Plugin
    • None

    Description

      TL;TR. When enabled, failIfNoTests set to "true" in the Surefire (also Failsafe?) configuration should fail its execution when no tests found in a given module.

      Rationale. Recently, adding SonarQube reporting in a multi module Maven project (which I didn't know well), I was surprised that the XML reports (from JUnit 5) on CI are generated only for one module. After some investigation, I've noticed that due to migration to JUnit Platform in that one module, tests in JUnit 4 from the other modules were not executed at all (in Maven/Surefire) due to dependency misconfiguration. However, they were executed fine in Idea.

      With that flag (hopefully enabled by default in Surefire 3.0-final), people making a migration would be alarmed about the problem - 0 tests in some module. Without that, the problem could be hidden for some time (if developers run them from IDE).

      Attachments

        Activity

          People

            Unassigned Unassigned
            szpak Marcin Zajaczkowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: