jenkinsci / jenkinsci/junit-plugin

[JENKINS-45025] unit publisher skips line breaks

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

Description

A file js-test-results.xml with result containing line breaks:


 

   

     

...


 

In Jenkins test results page it is displayed as one long line:


Error: expect(a).toEqual(expected) Expected value to equal: {"byId": {}, "tags": {}}

---
Originally reported by vorobievalex, imported from: unit publisher skips line breaks


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

Raw content of original issue

A file js-test-results.xml with result containing line breaks:


<testsuites name="jest tests">

  <testsuite name="ProductData" tests="1" errors="0" failures="1" skipped="0" timestamp="2017-06-21T10:19:58" time="1.518">

    <testcase classname="ProductData should return blabla" name="ProductData blabla" time="0.014">

      <failure message="Error: expect(a).toEqual(expected)

Expected value to equal:

  {"byId": {}, "tags": {}}

...


 

In Jenkins test results page it is displayed as one long line:


Error: expect(a).toEqual(expected) Expected value to equal: {"byId": {}, "tags": {}}

  • environment: Ubuntu, jenkins 2.46.3, latest unit publisher plugin

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the mentioned js-test-results.xml file and inspect how the JUnit plugin presents failure output on the Jenkins test results page. Done means the multiline failure message retains its line breaks instead of appearing as one long line.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.