apache / apache/maven-surefire
[SUREFIRE-526] Better support for other plugins to determine which tests are included/excluded and the order the tests get run
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Nick Pellow](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=npellow)** opened **[SUREFIRE-526](https://issues.apache.org/jira/browse/SUREFIRE-526?redirect=false)** and commented
Currently, it is possible to provide the 'test' pattern to the maven-surefire-plugin to include/exclude specific tests to be run.
This can be set on the MavenProject instance of any plugin which runs prior to the surefire plugin.
Since this is just a pattern of tests to include, it has the following shortcomings:
* To excludes a single test, you need to add _all_ tests, minus the test to exclude
* The order of the test patterns is not used when the tests get run.
If there is no better means to control which tests get run and in which order from outside the surefire plugin, how do you suggest this be achieved?
This may require changes to maven core to allow attributes be set as well as Properties.
---
**Issue Links:**
- [SUREFIRE-726](https://issues.apache.org/jira/browse/SUREFIRE-726) Test list preprocessor support for tests to be run
- [SUREFIRE-530](https://issues.apache.org/jira/browse/SUREFIRE-530) Allow runtime ordering of tests to be specified
Contributor guide
Research direction
Start by reviewing how the maven-surefire-plugin reads the test pattern from MavenProject and how external plugins can set it. Compare the linked issues SUREFIRE-726 and SUREFIRE-530 to determine whether test selection and execution order should be addressed together. Done means defining and implementing a supported way for other plugins to control included and excluded tests and their order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100