You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Melloware (JIRA)" <ji...@codehaus.org> on 2014/06/05 21:07:10 UTC

[jira] (SUREFIRE-1054) "test" property overrides "excludes" but not "excludedGroups"

    [ https://jira.codehaus.org/browse/SUREFIRE-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=347581#comment-347581 ] 

Melloware commented on SUREFIRE-1054:
-------------------------------------

The bug is because of this line in org.apache.maven.surefire.booter.ProviderParameterNames

public static final String TESTNG_EXCLUDEDGROUPS_PROP = "excludegroups";

Notice its lowercase so its never being found to be overridden.

> "test" property overrides "excludes" but not "excludedGroups"
> -------------------------------------------------------------
>
>                 Key: SUREFIRE-1054
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1054
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.16
>         Environment: Maven 3.1.1, JUnit 4.11, maven-surefire-plugin 2.16
>            Reporter: Elizabeth Chatman
>
> I recently changed my maven configuration to use the "excludedGroups" property instead of "excludes", and found that I can no longer run individual tests if they are part of the excludedGroups.
> Example:
> My default configuration used to look like this (using path and filename matching to try to match groups of tests):
> {code:xml}
> <excludes>
>   <exclude>**/integration/**</exclude>
>   <exclude>**/*IntegrationTest.java</exclude>
> </excludes>
> {code}
> My new configuration, after annotating my integration tests with {{@Category(IntegrationTests.class)}}:
> {code:xml}<excludedGroups>com.mycompany.IntegrationTests</excludedGroups>{code}
> Previously, I could run a single integration test using:
> {{mvn test -Dtest=NameOfIntegrationTest}}
> Now that command fails ("No tests were executed!") unless I manually override the excludedGroups property ({{mvn test -Dtest=NameOfIntegrationTest -DexcludedGroups=}})



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)