-
Bug
-
Resolution: Timed out
-
Low
-
None
-
5.10.6, 6.0.1
-
1
-
Severity 3 - Minor
-
Steps to Reproduce:
- Install Confluence
- Create sample Junit Test Result which contain number with separator. Eg: one of the Times is 2,667.156 , use broken-TESTS-TestSuites.xml
- Create a page in Confluence and insert JUnit Report Macro
Expected Behaviour:
Confluence shows test results
Actual Result:
- Error is thrown in UI as per shown:
- In Confluence log trace like below can be found:
2016-11-21 22:29:05,284 ERROR [http-nio-7506-exec-2] [plugins.macros.advanced.JUnitReportMacro] prepareJUnitTestReport Error parsing JUnit report file! -- url: /conf5106/display/CCC/qtw | page: 4587528 | traceId: c39179666d8b3360 | userName: admin | referer: http://localhost:7506/conf5106/pages/createpage.action?spaceKey=CCC&fromPageId=2457628 | action: viewpage org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 109; Error at (2, 109: For input string: "2,667.156" at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) ... Caused by: java.lang.NumberFormatException: For input string: "2,667.156" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.lang.Double.parseDouble(Double.java:538) at com.atlassian.confluence.renderer.radeox.macros.junit.JUnitTestCaseReport.setTimeAsString(JUnitTestCaseReport.java:22)
Workaround
Ensure that the Junit Test Result has <testsuites>... </testsuites> tag to enclosing the testsuite as per working TESTS-TestSuites.xml