Andrew Qiu created SUREFIRE-1900: ------------------------------------ Summary: Invalid character in SureFire xml test report Key: SUREFIRE-1900 URL: https://issues.apache.org/jira/browse/SUREFIRE-1900 Project: Maven Surefire Issue Type: Bug Components: Maven Surefire Plugin Affects Versions: 3.0.0-M5 Reporter: Andrew Qiu
Hi, I have tests failed in Jenkins build due to the junit plugin is unable to read the test reports generated by Surefire-plugin. The root cause is a invalid xml character. I think it's better for surefire plugin either to stripe out the invalid xml characters or replace some valid place_holder in test reports. An excerpt of stackTrace: {code:java} Failed to read test report file /data1/jenkins_agent/workspace/${JENKINS_JOB_NAME}/shared/indexer-common/target/surefire-reports/TEST-message_archiver.indexer_common.searcher.query.flexible.GRQueryParserTest.xml org.dom4j.DocumentException: Error on line 1437 of document : An invalid XML character (Unicode: 0xfffe) was found in the CDATA section. at org.dom4j.io.SAXReader.read(SAXReader.java:462) at org.dom4j.io.SAXReader.read(SAXReader.java:325) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:178) at hudson.tasks.junit.TestResult.parse(TestResult.java:378) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:308) at hudson.tasks.junit.TestResult.parse(TestResult.java:224) at hudson.tasks.junit.TestResult.parse(TestResult.java:196) at hudson.tasks.junit.TestResult.<init>(TestResult.java:151) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:144) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.xml.sax.SAXParseException; lineNumber: 1437; columnNumber: 52; An invalid XML character (Unicode: 0xfffe) was found in the CDATA section. at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204) {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)