Skip to content

Legacy XML reports should preserve new line characters in message attributes #4174

@gtach2o

Description

@gtach2o

Hello!

After switching test execution from using gradle with junit platform to console launcher I noticed that
value of message attribute in JUnit xml report loosing new line characters.
e.g.
Using gradle xml :

<error message="line 1&#10; line 2&#10; line 3&#10;"...

Using Console launcher xml:

<error message="
line 1
line 2
line 3
"

Steps to reproduce

  1. Run tests using gradle with junit platform. Throw multiline exception in test.
  2. Run tests using console launcher, throw multiline exception in test.

Context

org.junit.platform:junit-platform-console-standalone:1.11.3
org.junit.jupiter:junit-jupiter-engine:5.11.3
JRE 23

As I understand console launcher uses new open/xml report generator and gradle platform launcher uses legacy report generator, right?

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions