Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-18

XML test report does not have quotes escaped in attribute values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4 (2.0 plugin)
    • 1.5.2 (2.1.2 plugin)
    • None
    • None
    • Mac OS X 10.4.3, Java 1.4.2_09

    Description

      When I run my tests using maven ('mvn test'), the XML test reports that are generated have an invalid element for the 'java.vm.vendor' property. The Apple VM seems to set this to '"Apple Computer, Inc."' (note the double quotes).

      Here is a snippet from the generated test report, TEST-foo.FooTest.xml

      <?xml version="1.0" encoding="UTF-8" ?>
      <testsuite errors="0" tests="1" time="0.014" failures="0" name="foo.FooTest"
      <properties>
      <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="jav
      <property value="/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/
      <property value="1.4.2-54" name="java.vm.version"/>
      <property value="true" name="awt.nativeDoubleBuffering"/>
      <property value="false" name="gopherProxySet"/>
      <property value=""Apple Computer, Inc."" name="java.vm.vendor"/>
      <property value="http://apple.com/" name="java.vendor.url"/>
      <property value=":" name="path.separator"/>
      <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
      <property value="sun.io" name="file.encoding.pkg"/>

      Note that the 'java.vm.vendor' element has double quotes inside the value instead of ". I believe that this is invalid. I think that the line should instead read:

      <property value=""Apple Computer, Inc."" name="java.vm.vendor"/>

      I believe that the offending code is in XMLReporter where the property elements value is set. I'm not sure if it is the responsibility of this code or the code in Xpp3Dom that should munge the double quotes.

      The end result of all of this is that my 'mvn site:site' throws lots of errors since the test report XML parsing fails for surefire reporting.

      Attachments

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              jcharum Jerry Charumilind
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: