You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?xml version="1.0" encoding="UTF-8"?>
<testsuitexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd"
name="repro.MyTest"time="2.6"tests="1"errors="0"skipped="0"failures="1">
<properties/>
<testcasename="myMethod"classname="repro.MyTest"time="1.573">
<failuremessage="failure message with ]]>"type="java.lang.AssertionError">
java.lang.AssertionError: failure message with ]]>
</failure>
</testcase>
</testsuite>
```
junit-report-merger ./combined.xml "TEST-repro.MyTest.xml"
Generates an invalid xml file:
```
<?xml version="1.0"?>
<testsuitesfailures="1"errors="0"tests="1"><testsuitexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd"name="repro.MyTest"time="2.6"tests="1"errors="0"skipped="0"failures="1">
<properties/>
<testcasename="myMethod"classname="repro.MyTest"time="1.573">
<failuremessage="failure message with ]]>"type="java.lang.AssertionError">
java.lang.AssertionError: failure message with ]]>
</failure>
</testcase>
</testsuite></testsuites>
```
This file is invalid because "]]>" should not appear in xml file outside of xml CDATA. To solve this the > should be escaped as > similarly to what is done in original file
The text was updated successfully, but these errors were encountered:
BREAKING CHANGE: xmlbuilder2 does not support xml version 1.1, so junit-report-merger won't be able to process xml files with version 1.1 anymore. To my knowledge no tools use xml version 1.1 in their test reports, so this should not affect people. However, technically, this is a breaking change.
xmlbuilder2 is faster than xmldom, is maintained better and is successor of extremely popular xmlbuilder package. Also, it is more standard compliant.
Given a test file TEST-repo.MyTest.xml like this
The text was updated successfully, but these errors were encountered: