[ 
http://jira.codehaus.org/browse/SUREFIRE-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113101
 ] 

Khai Do commented on SUREFIRE-57:
---------------------------------

Actually I found the problem in my situation.  I must have installed some 
application which in turn added those invalid characters into my PATH system 
environment variable and that's why it was appearing the junit report.   
Anyways i've removed the offending characters from the PATH environment 
variable and that fixed my problem.

> Invalid characters in XML reports
> ---------------------------------
>
>                 Key: SUREFIRE-57
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-57
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 3.x support
>            Reporter: Klaus Brunner
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: pom.xml, TEST-com.acme.test.ResourceLoaderTest.xml
>
>
> Surefire (or possibly Xpp3Dom?) should check for invalid characters in JUnit 
> output and escape or mask them to ensure valid XML reports. This applies to 
> all characters outside the allowed range defined in the XML spec 
> (http://www.w3.org/TR/REC-xml/#NT-Char).
> I have a JUnit test case that uses assertEquals on strings. In some 
> situations, the string to compare against the reference may be completely 
> garbled and contain things such as null characters, which then show up in the 
> assertion failure message ("expected X but was Y") and consequently in the 
> XML reports. 
> Here's a simple test case to trigger the problem:
> public class InvalidCharactersTest extends TestCase {
>     public void testStrings() {
>         String expected = "abc";
>         String actual = "abc" + '\u0000';
>         assertEquals(expected, actual);
>     }
> }
> The resulting Surefire XML report contains the null character as is and is 
> therefore not valid XML. Running the Surefire Reports plugin then fails with 
> a parsing error.

-- 
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

        

Reply via email to