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

Version 3.0.0-M5 fails to find Junit tests, while 3.0.0-M4 finds and runs it

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 3.0.0-M5
    • Fix Version/s: None
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Environment:
      Windows 10 Pro
      Maven 3.6.3
      OpenJDK 12

      Description

      Maven Surefire Plugin Version 3.0.0-M5 fails to find and run JUnit 5 tests, while 3.0.0-M4 seems to do it fine. All things other than the plugin version are equal.

      Output with 3.0.0-M5:

      [INFO] Scanning for projects...
      [INFO]
      [INFO] ----------------------------< de.test:test >----------------------------
      [INFO] Building SF300M5 0.0.1
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test ---
      [INFO] Deleting D:\testing\maven\surefire\SF300M5\target
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory D:\testing\maven\surefire\SF300M5\src\main\resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ test ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ test ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory D:\testing\maven\surefire\SF300M5\src\test\resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ test ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to D:\testing\maven\surefire\SF300M5\target\test-classes
      [INFO]
      [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ test ---
      [INFO]
      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO]
      [INFO] Results:
      [INFO]
      [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  2.338 s
      [INFO] Finished at: 2020-06-28T11:08:38+02:00
      [INFO] ------------------------------------------------------------------------
      

      Output with 3.0.0-M4:

      [INFO] Scanning for projects...
      [INFO]
      [INFO] ----------------------------< de.test:test >----------------------------
      [INFO] Building SF300M4 0.0.1
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test ---
      [INFO] Deleting D:\testing\maven\surefire\SF300M4\target
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory D:\testing\maven\surefire\SF300M4\src\main\resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ test ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ test ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory D:\testing\maven\surefire\SF300M4\src\test\resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ test ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to D:\testing\maven\surefire\SF300M4\target\test-classes
      [INFO]
      [INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ test ---
      [INFO]
      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running SFTests
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 s - in SFTests
      [INFO]
      [INFO] Results:
      [INFO]
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  2.832 s
      [INFO] Finished at: 2020-06-28T11:10:34+02:00
      [INFO] ------------------------------------------------------------------------
      

      I´ve attached minimal test projects with both plugin versions. Everything except the plugin version in the pom files should be the same.

       

        Attachments

        1. log.diff
          37 kB
          Thiago Henrique Hupner
        2. m4.log
          90 kB
          Thiago Henrique Hupner
        3. m5.log
          90 kB
          Thiago Henrique Hupner
        4. SF300M4-M5.zip
          3 kB
          Nils Dralle

          Activity

            People

            • Assignee:
              tibordigana Tibor Digana
              Reporter:
              nils91 Nils Dralle
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: