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

The Description argument RunListener#testRunStarted(Description) doesn't include test methods

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.19.1
    • Fix Version/s: 3.0
    • Component/s: Maven Surefire Plugin
    • Labels:
      None

      Description

      In Surefire 2.19 the Description passed to testRunStarted() is a test run description and has 2 levels of children (test classes > test methods). The top level Description's testCount property is equal to the number of test methods in all test classes that are going to be run. When dumping the description tree it may look like this:

      Description: ~ null (6)
      Description: ~ ~ io.github.yurloc.example.runlistener.MyFirstTest (2)
      Description: ~ ~ ~ testMethod1(io.github.yurloc.example.runlistener.MyFirstTest) (1)
      Description: ~ ~ ~ testMethod2(io.github.yurloc.example.runlistener.MyFirstTest) (1)
      Description: ~ ~ io.github.yurloc.example.runlistener.MySecondTest (4)
      Description: ~ ~ ~ testMethodA(io.github.yurloc.example.runlistener.MySecondTest) (1)
      Description: ~ ~ ~ testMethodB(io.github.yurloc.example.runlistener.MySecondTest) (1)
      Description: ~ ~ ~ testMethodC(io.github.yurloc.example.runlistener.MySecondTest) (1)
      Description: ~ ~ ~ testMethodD(io.github.yurloc.example.runlistener.MySecondTest) (1)
      

      However in Surefire 2.19.1 the leaf descriptions of test methods are missing:

      Description: ~ null (2)
      Description: ~ ~ io.github.yurloc.example.runlistener.MyFirstTest (1)
      Description: ~ ~ io.github.yurloc.example.runlistener.MySecondTest (1)
      

      Because of this I am unable to access the total test count, which I use to calculate ETA of the test run finish. I seem that this change of behavior was introduced by fixing SUREFIRE-1187.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jlocker@redhat.com Jiri Locker
              • Votes:
                4 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: