[MNG-7113] config maven to mark “running test” as ERROR when some tests are skipped
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Jan](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kowalski)** opened **[MNG-7113](https://issues.apache.org/jira/browse/MNG-7113?redirect=false)** and commented
As a tester/developer I would like to have a flag in maven to set final verdict of running tests to ERROR when some tests has been skipped.
Flag name proposal:
markBuildAsErrorWhenAnyTestSkipped
Example using:
mvn test -DmarkBuildAsErrorWhenAnyTestSkipped=false
```
[WARNING] Tests run: 1423, Failures: 0, Errors: 0, **Skipped: 3,** Time elapsed: 149.449 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 1423, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] **BUILD SUCCESS**
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:55 min
[INFO] Finished at: 2021-03-10T13:12:35+01:00
[INFO] ------------------------------------------------------------------------
```
mvn test -DmarkBuildAsErrorWhenAnyTestSkipped=true
```
[WARNING] Tests run: 1423, Failures: 0, Errors: 0, **Skipped: 3,** Time elapsed: 149.449 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 1423, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] **BUILD ERROR**
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:55 min
[INFO] Finished at: 2021-03-10T13:12:35+01:00
[INFO] ------------------------------------------------------------------------
```
---
No further details from [MNG-7113](https://issues.apache.org/jira/browse/MNG-7113?redirect=false)
Contributor guide
Assessment
This issue has not been assessed yet.