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

JUnit 5 in parallel execution mode confuses Surefire reports



    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-M3
    • None
    • JUnit 5.x support


      Hi I hope somebody here can help me out. I am observing something strange while using JUNIT 5 parallel execution. I have two test classes TagTests, and TagTypeTests. When I set the execution mode to CONCURRENT on both classes, and run them, the test report shows the test cases on the wrong test class. For example, the test case testA belongs to class TagTests, but it is shown in the TagTypeTests test report. TagTests has 11 test cases, and TagType has 13 test cases. But the test report shows there are 22 test cases in TagTypeTests, and 2 in TagTests. Is this a known issue of parallelism? How to get around the issue?

      Sam Brannen @sbrannen Mar 01 18:00
      How is the test report generated? In an IDE? Using a build tool?

      James Zhou @jazhou Mar 01 19:47
      @sbrannen I am using maven surefire plugin(ver 3.0.0-M3) to run the tests. Here is the results:
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.42 s - in org.aaa.test.functional.tests.TagCrudTests
      [INFO] Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.148 s - in org.aaa.test.functional.tests.TagTypeTests
      [INFO] Results:
      [INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0
      @sbrannen there are actually 11 tests under TagCrudTests. Somehow only one test is shown in the report generated by surefire plugin

      Christian Stein @sormuras Mar 01 20:31
      @jazhou Do you have a minimal (failing) example project to share?

      James Zhou @jazhou Mar 01 22:56
      @sormuras Sure. Here is the code: https://github.com/jazhou/junit5-parallel-test


        Issue Links



              tibordigana Tibor Digana
              sor Christian Stein
              4 Vote for this issue
              8 Start watching this issue