apache / apache/maven-surefire
[SUREFIRE-1407] config with suiteXmlFile: groups/excludedGroups params are not ignored
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Michael Schieder](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mschieder)** opened **[SUREFIRE-1407](https://issues.apache.org/jira/browse/SUREFIRE-1407?redirect=false)** and commented
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
```
[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
```
mvn test -DexcludedGroups=group1,group2 ==> Tests run: 0; (x) expected: Tests run: 2
```
[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
```
mvn test ==> Tests run: 2 (/)
```
[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
```
---
**Affects:** 2.20
**Attachments:**
- [surefire-bug.zip](https://issues.apache.org/jira/secure/attachment/12881295/surefire-bug.zip) (_1.79 kB_)
Contributor guide
Research direction
Start by running the attached surefire-bug.zip test project with the three Maven commands shown in the issue and compare the TestNG suite counts. Trace how suiteXmlFiles is handled alongside groups and excludedGroups; done means both group parameters are ignored when a suite XML file is specified, with two tests running in each expected case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100