Michael Schieder created SUREFIRE-1407:
------------------------------------------

             Summary: config with suiteXmlFile: groups/excludedGroups params 
are not ignored
                 Key: SUREFIRE-1407
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1407
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin, TestNG support
    Affects Versions: 2.20
            Reporter: Michael Schieder
         Attachments: surefire-bug.zip

surefire-plugin should ignore groups and excludedGroups parameters as 
documented 
[here|http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#groups]
 and 
[here|http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#excludedGroups]:
??This parameter is ignored if the suiteXmlFiles parameter is specified.??

the attached test project defines a TestNG suite and two tests which belong to 
different groups (group1 and group2)

mvn test -Dgroups=group1 ==> Tests run: 1;  (x) excpected: Tests run: 2
{noformat}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.534 s -
 in TestSuite
{noformat}


mvn test -DexcludedGroups=group1,group2 ==> Tests run: 0; (x) expected: Tests 
run: 2
{noformat}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 s -
 in TestSuite
{noformat}

mvn test ==> Tests run: 2 (/)
{noformat}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.544 s -
 in TestSuite
{noformat}








--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to