jenkinsci / jenkinsci/junit-plugin
[JENKINS-21565] In case of MultipleFailureException Jenkins test results show only the last failure
- Dominant language
- Java
- Stars
- 87
- Forks
- 351
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 2
Description
If a JUnit test fails for example in the @Test method and in the @After method, JUnit throws a MultipleFailureException containing both failures.
Jenkins' test result page shows only the last failure (the one from the @After method), the more important one from the @Test method is not shown.
The JUnit xml file created by Ant contains two / elements for this test case. One is just not shown.
---
Originally reported by wolterhis, imported from: In case of MultipleFailureException Jenkins test results show only the last failure
Raw content of original issue
If a JUnit test fails for example in the @Test method and in the @After method, JUnit throws a MultipleFailureException containing both failures.
Jenkins' test result page shows only the last failure (the one from the @After method), the more important one from the @Test method is not shown.
The JUnit xml file created by Ant contains two <error>/<failure> elements for this test case. One is just not shown.
environment
```
Ant 1.9.3, Java 1.7.0_51
Ubuntu 12.04 LTS
```
Contributor guide
Research direction
Start by reproducing the case with an Ant-generated JUnit XML file containing multiple error or failure elements, then trace how the Jenkins test result page reads and displays that test case. Done means the page shows both failures, including the failure from the @Test method and the one from the @After method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100