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

Add custom name suffix for surefire-reports (xml and txt)

    XMLWordPrintableJSON

Details

    • Patch

    Description

      Hi.

      I'd to add support in surefire for custom name suffix for tests in surefire-reports.

      Motivation 1):
      I have more modules, some modules are sharing tests from another using org.codehaus.mojo:build-helper-maven-plugin.
      I'd like to have txt and xml files with some differentiator to determine in which module tests were executed.

      Motivation 2):
      I have defined several executions where I use different parameters and execute the same tests in each execution.
      Again, I'd like to have txt and xml files with some differentiator.

      Solution:
      Introduce new configuration property reportNameSuffix.
      Patch for this improvement is included.

      Tested:
      Yes, <reportNameSuffix>customText</reportNameSuffix> added into surefire plugin configuration and received these files:
      org.xyz.test.componentA.ComponentAUnitTest-customText-output.txt
      org.xyz.test.componentA.ComponentAUnitTest-customText.txt
      org.xyz.test.componentB.ComponentBUnitTest-customText-output.txt
      org.xyz.test.componentB.ComponentBUnitTest-customText.txt
      TEST-org.xyz.test.componentA.ComponentAUnitTest-customText.xml
      TEST-org.xyz.test.componentB.ComponentBUnitTest-customText.xml

      Tested without <reportNameSuffix> defined too, original file names and content generated.

      Attachments

        1. reportNameSuffix.patch
          17 kB
          Rostislav Svoboda
        2. reportNameSuffix-tests.patch
          8 kB
          Rostislav Svoboda
        3. reportNameSuffix-remake.patch
          25 kB
          Rostislav Svoboda

        Activity

          People

            pgier Paul Gier
            rsvoboda Rostislav Svoboda
            Votes:
            18 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: