jenkinsci / jenkinsci/junit-plugin

[JENKINS-21565] In case of MultipleFailureException Jenkins test results show only the last failure

Open
#954 0 comments 0 reactions 0 assignees View on GitHub
component:junit-plugin imported-jira-issue priority:major resolution:unresolved
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


  • status: Open
  • priority: Major
  • component(s): junit-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-11-26

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.