List Info

Thread: Created: (SUREFIRE-57) Invalid characters in XML reports




Created: (SUREFIRE-57) Invalid characters in XML reports
user name
2006-11-30 17:33:43
Invalid characters in XML reports
---------------------------------

                 Key: SUREFIRE-57
                 URL: http://ji
ra.codehaus.org/browse/SUREFIRE-57
             Project: surefire
          Issue Type: Bug
          Components: JUnit 3.x support
            Reporter: Klaus Brunner
            Priority: Critical


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.o
rg/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: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        
Updated: (SUREFIRE-57) Invalid characters in XML reports
user name
2007-01-23 21:17:39
[ http://jira.codehaus.org/browse/SUREFIRE-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brett Porter updated SUREFIRE-57: --------------------------------- Fix Version/s: 2.3 > 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.3 > > > 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
Updated: (SUREFIRE-57) Invalid characters in XML reports
user name
2007-02-23 01:06:36
     [ htt
p://jira.codehaus.org/browse/SUREFIRE-57?page=com.atlassian.
jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-57:
---------------------------------

    Fix Version/s:     (was: 2.3)
                   2.4

> Invalid characters in XML reports
> ---------------------------------
>
>                 Key: SUREFIRE-57
>                 URL: http://ji
ra.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
>
>
> 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.o
rg/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: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

Updated: (SUREFIRE-57) Invalid characters in XML reports
user name
2007-11-07 08:49:35
     [ htt
p://jira.codehaus.org/browse/SUREFIRE-57?page=com.atlassian.
jira.plugin.system.issuetabpanels:all-tabpanel ]

Khai Do updated SUREFIRE-57:
----------------------------

    Attachment: pom.xml

> Invalid characters in XML reports
> ---------------------------------
>
>                 Key: SUREFIRE-57
>                 URL: http://ji
ra.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.o
rg/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: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

Commented: (SUREFIRE-57) Invalid characters in XML reports
user name
2007-11-07 08:49:35
    [ http://jira.codehaus.org/browse/SUREFIRE-57?p
age=com.atlassian.jira.plugin.system.issuetabpanels:comment-
tabpanel#action_113079 ] 

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

I am having the same problem with invalid characters. 
However the invalid character is not in the same exact
location for me.  I'm getting an invalid character in the
"java.library.path" property in the my surefire
junit reports.

I will attach the junit report for you to see (line
28:385-388).  Also attached is my pom.xml  that i used to
run test and generate the report.

I'm running on Win2003 server using java 1.5_07, maven 2.0.7
and ant 1.6.5

> Invalid characters in XML reports
> ---------------------------------
>
>                 Key: SUREFIRE-57
>                 URL: http://ji
ra.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.o
rg/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: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

Updated: (SUREFIRE-57) Invalid characters in XML reports
user name
2007-11-07 08:49:36
     [ htt
p://jira.codehaus.org/browse/SUREFIRE-57?page=com.atlassian.
jira.plugin.system.issuetabpanels:all-tabpanel ]

Khai Do updated SUREFIRE-57:
----------------------------

    Attachment: TEST-com.acme.test.ResourceLoaderTest.xml

> Invalid characters in XML reports
> ---------------------------------
>
>                 Key: SUREFIRE-57
>                 URL: http://ji
ra.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.o
rg/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: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )