You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Mike Whittemore (JIRA)" <ji...@codehaus.org> on 2006/02/02 17:21:13 UTC

[jira] Commented: (MSUREFIRE-54) XML test reports are not well-formed when failure message contains quotes.

    [ http://jira.codehaus.org/browse/MSUREFIRE-54?page=comments#action_57648 ] 

Mike Whittemore commented on MSUREFIRE-54:
------------------------------------------

Ha ha. The JIRA rendering rendered the symbols above as HTML rather than verbatim. The symbols should be &amp;quot;, &amp;lt; and &amp;gt;

> XML test reports are not well-formed when failure message contains quotes.
> --------------------------------------------------------------------------
>
>          Key: MSUREFIRE-54
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-54
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>  Environment: n/a
>     Reporter: Mike Whittemore
>  Attachments: TEST-bad.xml, TEST-good.xml, XMLReporter.java, unittests.xsl
>
>
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org