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

Implement testRunId and RunMode in the SimpleReportEntry

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-M6
    • None
    • None

    Description

      This ticketis the most important in SUREFIRE-1860 because it implements RunMode and testRunId in the ReportEntry, TestSetReportEntry, SimpleReportEntry, CategorizedReportEntry and WrappedReportEntry in appropriate implementation form.

      Additionally, we should distinguish between two events (OutputReportEntry, TestOutputReportEntry) and therefore the interface TestReportListener handles them via generics dependeing on the situation.
      The first situation happens when provider's listeners handles the event OutputReportEntry from System.out and System.err via the ConsoleOutputCapture. The ConsoleOutputCapture does not have any notion about runMode and testRunId, and therefore the only provider's listener would add runMode and testRunId to a recreated entry which would be finally propagated to the ForkingRunListener and TestSetRunListener. The runMode and testRunId are determined opon the events testStarted and any test end and Thread local.
      The second situation happens when ForkingRunListener and TestSetRunListener handles TestOutputReportEntry which contains runMode and testRunId.

      Some classes are deprecated in the module surefire-junit47 and can be freely removed after the XML Reporter would be fully capable of parallel tests (must support events chaos in one thread). That's the reason why parallel tests are badly handled in JUnit5 reports. The provider surefire-junit47 also supports parallel tests and we do not see the problem with undeterministic XML report, but the reason is that the provider has a cache, eats the memory including the std/out logs and all the messages and test events are replayed in a sequence as if the tests were executed in one thread.

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              tibordigana Tibor Digana
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: