jenkinsci / jenkinsci/junit-plugin

[JENKINS-20444] Suggestion about improve of work with XML format of JUNIT

Open
#945 0 comments 0 reactions 0 assignees View on GitHub
component:junit-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
87
Forks
351
Avg merge
1d 19h
Merged PRs (30d)
2

Description

Hi Guys,

History of question is:

We have own system of tests for our C++ product,

which is in develop more of 10 years.

Now we consider plug this under Jenkins, so we try

to generated minimal required XML file in JUNIT format.

There was hope that may be, we can put into XML file only list of failed tests, and avoid list successful tests. Something like this:

=====================================================





















=====================================================

But this not works ....

Jenkins simply ignores attributes of line:

And simply try parse all existed tests in XML, and count self failed and successful tests.

Why is this?

Above XML file is correct from any point of view.

And it is minimal to make Jenkins record results ...

And lets assume, that for our team it is okay to see only list of failed tests... No many sense to see 12500 successful tests on HTML pages of Jenkins. We have for this own log file.

---
Originally reported by ruslan_zasukhin, imported from: Suggestion about improve of work with XML format of JUNIT


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

Raw content of original issue

Hi Guys,

History of question is:
We have own system of tests for our C++ product,
which is in develop more of 10 years.

Now we consider plug this under Jenkins, so we try
to generated minimal required XML file in JUNIT format.

There was hope that may be, we can put into XML file only list of failed tests, and avoid list successful tests. Something like this:

=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="All Tests" tests="12345" failures="3" errors="0" time="350">
<testcase name="Addition" classname="" time="100">
<failure message="Value of: add(1, 1); Actual: 1;Expected: 2" type=""/>
<failure message="Value of: sin(0); Actual: 1;Expected: 0" type=""/>
</testcase>
<testcase name="Zip Compresion" classname="" time="250">
<failure message="Value of: zipme(); Actual: 1;Expected: 2" type=""/>
</testcase>
</testsuites>
=====================================================

But this not works ....

Jenkins simply ignores attributes of line:

<testsuites name="All Tests" tests="12345" failures="3" errors="0" time="350">

And simply try parse all existed tests in XML, and count self failed and successful tests.

Why is this?

Above XML file is correct from any point of view.
And it is minimal to make Jenkins record results ...

And lets assume, that for our team it is okay to see only list of failed tests... No many sense to see 12500 successful tests on HTML pages of Jenkins. We have for this own log file.

  • environment: not matters

Contributor guide

Open the contributing guide

Research direction

Start by reading the junit-plugin's handling of JUnit XML reports, focusing on how testsuites attributes and testcase elements are interpreted. Determine the expected behavior when successful tests are omitted, then define tests and acceptance criteria for recording only the supplied failed tests or document why the format cannot support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.