You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/01/22 00:05:17 UTC
[jira] Updated: (SUREFIRE-224) XML test reports are not well-formed
when failure message contains quotes.
[ http://jira.codehaus.org/browse/SUREFIRE-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-224:
----------------------------------
Affects Version/s: 1.5.2 (2.1.2 plugin)
> XML test reports are not well-formed when failure message contains quotes.
> --------------------------------------------------------------------------
>
> Key: SUREFIRE-224
> URL: http://jira.codehaus.org/browse/SUREFIRE-224
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 1.5.2 (2.1.2 plugin)
> Environment: n/a
> Reporter: Mike Whittemore
> Assigned To: Carlos Sanchez
> Attachments: TEST-bad.xml, TEST-good.xml, unittests.xsl, XMLReporter.java
>
>
> When a test fails, and the error message contains quotes, the surefire XML report is not well-formed. The error message gets placed in the <failure> element's 'message' attribute, which causes nested quotes if the message contains any quotes. Error message quotes should be escaped I believe.
> This may apply to other elements in the XML report.
> I am using surefire plugin version 2.1.2 but it may affect other versions as well.
> Test Case:
> It's not junit, but it may be helpful. I've attached two faked XML reports that resemble real Maven2 XML surefire reports. The 'bad' one has a message with quotes, the 'good' one does not. I used Xalan and an XSLT found in my CruiseControl install to transform each one. The 'bad' one cannot be parsed. The 'good' well-formed one can be parsed and successfully transformed. I've also attached the XSLT. The commands to run the transforms follow:
> java -cp <path to xalan jar> org.apache.xalan.xslt.Process -IN TEST-good.xml -XSL unittests.xsl
> java -cp <path to xalan jar> org.apache.xalan.xslt.Process -IN TEST-bad.xml -XSL unitests.xsl
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira