apache / apache/maven-surefire
[SUREFIRE-701] showSuccess option for test reports: show reports only for failed tests
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Alexander Klimetschek](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alexander.klimetschek)** opened **[SUREFIRE-701](https://issues.apache.org/jira/browse/SUREFIRE-701?redirect=false)** and commented
Use case:
When you have a few tests, and some of them fail during development/refactoring, you find yourself repeatedly looking into target/surefire-reports to open the test report (txt) files with the errors and stack traces to analyze them. However, by default reports will be written also for successful tests, and both in txt and xml format (the xml files can already be omitted using disableXmlReport=false). This makes it hard to find the files that contain the failed tests.
Solution proposal:
Just as the maven-surefire-report-plugin already has a showSuccess option, that, if set to "false", will not report successful tests, the same should be available for the maven-surefire-plugin and the normal test goal.
Either set "-DshowSuccess=false" on the command line or define "\false\" in the maven-surefire-plugin configuration of the pom, and reports for successful tests should not be written to the reports directory.
---
**Affects:** 2.8
**Attachments:**
- [showsuccess.patch](https://issues.apache.org/jira/secure/attachment/12719857/showsuccess.patch) (_17.63 kB_)
**Issue Links:**
- [SUREFIRE-726](https://issues.apache.org/jira/browse/SUREFIRE-726) Test list preprocessor support for tests to be run
Contributor guide
Research direction
Start by comparing the existing showSuccess option in the maven-surefire-report-plugin with the proposed showsuccess.patch, then inspect how the maven-surefire-plugin writes files under target/surefire-reports. Done means supporting the command-line or pom setting and omitting reports for successful tests while retaining failed-test reports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100