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

Surefire report plugin only executed tests once. Junit Categorization is not possible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.12.2
    • None
    • None
    • maven 3.0.4
      junit 4.8.1

    Description

      When I am trying to run categorized junit tests ,
      maven surefire pluing run only first group. All other groups are skipped.
      pom.xml

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.12.2</version>
        <reportSets>
          <reportSet>
            <id>unit</id>
            <configuration>
              <groups>com.mycompany.mavenproject2.UnitTest</groups> 
              <reportsDirectory> ${project.build.directory}/surefire-reports/unit </reportsDirectory>
              <outputName>surefire-report-unit</outputName>
              <reportNameSuffix>UNIT</reportNameSuffix> 
            </configuration>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>comp</id>
            <configuration>
              <groups>com.mycompany.mavenproject2.ComponentTest</groups> 
              <reportsDirectory> ${project.build.directory}/surefire-reports/comp</reportsDirectory> 
              <reportNameSuffix>COMPONENT</reportNameSuffix> 
              <outputName>surefire-report-comp</outputName>     
            </configuration> 
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>sys</id>
            <configuration>
              <groups>com.mycompany.mavenproject2.SystemTest</groups>
              <reportsDirectory> ${project.build.directory}/surefire-reports/sys</reportsDirectory>
              <reportNameSuffix>SYSTEM</reportNameSuffix> 
              <outputName>surefire-report-sys</outputName>                 
            </configuration> 
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      With output

       T E S T S
      -------------------------------------------------------
      Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
      Running com.mycompany.mavenproject2.AppTest
      UnitTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
      
      Results :
      
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
      
      
      [surefire:test]
      Skipping execution of surefire because it has already been run for this configuration
      
      [surefire:test]
      Skipping execution of surefire because it has already been run for this configuration
      
      [surefire:test]
      Skipping execution of surefire because it has already been run for this configuration
      

      Attachments

        1. mavenproject2.zip
          6 kB
          Ronal Bashirov

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              merlusha Ronal Bashirov
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: