XML output and ant junitreport

Anonymous
2002-05-06
2013-04-22
  • Anonymous - 2002-05-06

    The XML output generated by the XMLOutputter class does not seem to be suitable for input to the ant junitreport task. junitreport says it is not a valid testsuite XML document. Is this expected, or am I doing something wrong?

    Thanks,
    Mike Hartman

     
    • Luis Joaquim

      Luis Joaquim - 2002-05-20

      I believe you are doing everything ok.

      However, I completly agree with you. The XML Log File should be similar to the produced by Junit/Ant; so we could use the same XSL.

      Does anybody has changed the XML result file ??

      Luis Joaquim

       
      • Steve Kelem

        Steve Kelem - 2005-01-03

        Has nothing been done on this topic in the past 2 years?
        Is there a way to use junitreport or some equivalent to generate html reports?

        Thanks,
        Steve

         
    • Anonymous - 2002-10-18

      I'd be happy if the distribution included the W3C schema

       
    • Anonymous - 2002-10-21

      I'd be happy if the distribution included the W3C schema

       
    • Anonymous - 2002-10-21

      To make up for the fact that I pressed refresh on my page this morning, before having my coffee (I hastily add). Here is a possible schema for the XML outputter's report:

      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
          <xs:element name="TestRun">
              <xs:complexType>
                  <xs:sequence>
                      <xs:element name="FailedTests">
                          <xs:complexType>
                              <xs:sequence>
                                  <xs:element name="FailedTest" maxOccurs="unbounded">
                                      <xs:complexType mixed="true">
                                          <xs:sequence>
                                              <xs:element name="Name" type="xs:string"/>
                                              <xs:element name="FailureType" type="xs:string"/>
                                              <xs:element name="Location">
                                                  <xs:complexType>
                                                      <xs:sequence>
                                                          <xs:element name="File" type="xs:string"/>
                                                          <xs:element name="Line" type="xs:integer"/>
                                                      </xs:sequence>
                                                  </xs:complexType>
                                              </xs:element>
                                          </xs:sequence>
                                          <xs:attribute name="id" type="xs:integer" use="required"/>
                                      </xs:complexType>
                                  </xs:element>
                              </xs:sequence>
                          </xs:complexType>
                      </xs:element>
                      <xs:element name="SucessfulTests">
                          <xs:complexType>
                              <xs:sequence>
                                  <xs:element name="Test" maxOccurs="unbounded">
                                      <xs:complexType>
                                          <xs:sequence>
                                              <xs:element name="Name" type="xs:string"/>
                                          </xs:sequence>
                                          <xs:attribute name="id" type="xs:integer" use="required"/>
                                      </xs:complexType>
                                  </xs:element>
                              </xs:sequence>
                          </xs:complexType>
                      </xs:element>
                      <xs:element name="Statistics">
                          <xs:complexType>
                              <xs:sequence>
                                  <xs:element name="Tests" type="xs:integer"/>
                                  <xs:element name="FailuresTotal" type="xs:integer"/>
                                  <xs:element name="Errors" type="xs:integer"/>
                                  <xs:element name="Failures" type="xs:integer"/>
                              </xs:sequence>
                          </xs:complexType>
                      </xs:element>
                  </xs:sequence>
              </xs:complexType>
          </xs:element>
      </xs:schema>

      Note that this does not capture the test id's uniqueness.
      http://www.w3.org/TR/xmlschema-0/#specifyingUniqueness states that uniqueness can only be enforced on one attribute or element. Anyone know how to get around this (besides changing XML output!).

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks