ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17709] New: - junit report produces invalid XML hence junitreport fails
Date Thu, 06 Mar 2003 03:53:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17709>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17709

junit report produces invalid XML hence junitreport fails

           Summary: junit report produces invalid XML hence junitreport
                    fails
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: gary.frost@ssmb.com.au


I'm running ant as "ant -listener org.apache.tools.ant.XmlLogger"
Executing a test that cleans, builds and unittests the application.

When running the junit tests (using the formatter type="xml") (actually running 
Cactus tests), however the output produces invalid XML.

The invalide line is : 

<message priority="warn"><![CDATA[692 [main] INFO httpcl
ient.wire  - << "<webresult><exception classname="junit.framework.AssertionFaile
dError"><message><![CDATA[null]]></message><stacktrace><![CDATA[junit.framework.
AssertionFailedError]]></message>

You can see the invalid <stacktrace> entry


When I then run the style task to format the log.xml 
    <style in="${XmlLogger.file}" out="${build.report}/buildLog.html" 
style="${ant.XmlLogger.stylesheet.uri}"/>   (The standard stylesheet for logger)

I get the following output



Buildfile: build.xml

build-report:
    [style] Processing /home/gf06866/workspaces/Atlas/webAtlas/log.xml 
to /home/gf06866/workspaces/Atlas/webAtlas/doc/build/buildLog.html
    [style] Loading stylesheet /usr/local/java/packages/jakarta-ant/jakarta-ant-
1.5.1/etc/log.xsl
    [style] [Fatal Error] log.xml:764:245: The element type "stacktrace" must 
be terminated by the matching end-tag "</stacktrace>".
    [style] : Fatal Error! org.xml.sax.SAXParseException: The element 
type "stacktrace" must be terminated by the matching end-tag "</stacktrace>". 
Cause: org.xml.sax.SAXParseException: The element type "stacktrace" must be 
terminated by the matching end-tag "</stacktrace>".
    [style] Failed to process /home/gf06866/workspaces/Atlas/webAtlas/log.xml

BUILD FAILED
file:/home/gf06866/workspaces/Atlas/webAtlas/build.xml:339: Fatal error during 
transformation



Thanks

Gary

Mime
View raw message