You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2011/12/05 20:38:39 UTC

[jira] Closed: (SUREFIRE-805) Regression: surefire 2.11 seems to break excludeGroups config with TestNG

     [ https://jira.codehaus.org/browse/SUREFIRE-805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-805.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.12
         Assignee: Kristian Rosenvold

Fixed in r1210583, IT added in r1210590

> Regression: surefire 2.11 seems to break excludeGroups config with TestNG
> -------------------------------------------------------------------------
>
>                 Key: SUREFIRE-805
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-805
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Christoph Kutzinski
>            Assignee: Kristian Rosenvold
>             Fix For: 2.12
>
>
> I've a configuration to differentiate between unit and integration tests via TestNG groups.
> I cannot provide the full POM/project, but the relevant parts of the POMs like this:
> {noformat}
> <properties>
>     <skipUnitTests>${skipTests}</skipUnitTests>
>     <skipIntegrationTests>true</skipIntegrationTests>
>   </properties>
> <plugin>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <version>2.10</version><!-- Note: 2.11 seems to break excludedGroups configs -->
>                 <configuration>
>                     <!-- skip default execution. Use executions defined below -->
>                     <skip>true</skip>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <id>surefire-unit</id>
>                         <phase>test</phase>
>                         <goals>
>                             <goal>test</goal>
>                         </goals>
>                         <configuration>
>                             <skip>${skipUnitTests}</skip>
>                             <excludedGroups>INTEGRATION</excludedGroups>
>                         </configuration>
>                     </execution>
>                     <execution>
>                         <id>surefire-it</id>
>                         <phase>integration-test</phase>
>                         <goals>
>                             <goal>test</goal>
>                         </goals>
>                         <configuration>
>                             <skip>${skipIntegrationTests}</skip>
>                             <excludedGroups>UNIT</excludedGroups>
>                             <forkMode>once</forkMode>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>  <profiles>
>         <profile>
>             <id>it-tests</id>
>             <properties>
>                 <skipUnitTests>true</skipUnitTests>
>                 <skipIntegrationTests>false</skipIntegrationTests>
>             </properties>
>         </profile>
> </profiles>
> {noformat}
> With Surefire this works fine - i.e. integration tests are only disabled with the it-tests profile. With Surefire 2.11 the it tests are executed in the default profile!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira