Test Space XML Schema

From STRIDE Wiki
Revision as of 22:19, 30 May 2012 by Timd (talk | contribs) (Created page with '==Test Space XSD== The following xsd describes the schema accepted by the Test Space uploader. <pre> <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.or…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Test Space XSD

The following xsd describes the schema accepted by the Test Space uploader.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:element name="reporter">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="test_suite"/>
      </xs:sequence>
      <xs:attribute name="product_version" use="required" type="xs:NMTOKEN"/>
      <xs:attribute name="schema_version" use="required" type="xs:decimal"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="test_suite">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="test_suite"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="test_case"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="annotation"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="custom_data"/>
      </xs:sequence>
      <xs:attribute name="description" use="optional"/>
      <xs:attribute name="failed" use="required" type="xs:integer"/>
      <xs:attribute name="in_progress" use="required" type="xs:integer"/>
      <xs:attribute name="linked" use="required" type="xs:boolean"/>
      <xs:attribute name="name" use="required" type="xs:NCName"/>
      <xs:attribute name="not_applicable" use="required" type="xs:integer"/>
      <xs:attribute name="passed" use="required" type="xs:integer"/>
      <xs:attribute name="start_time" use="required" type="xs:dateTime"/>
      <xs:attribute name="unknown" use="required" type="xs:integer"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="test_case">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="annotation"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="custom_data"/>
      </xs:sequence>
      <xs:attribute name="description" use="optional"/>
      <xs:attribute name="duration" use="required" type="xs:decimal"/>
      <xs:attribute name="explicit_duration" use="required" type="xs:boolean"/>
      <xs:attribute name="metric" use="required" type="xs:decimal"/>
      <xs:attribute name="metric_units" use="required"/>
      <xs:attribute name="name" use="required" type="xs:NCName"/>
      <xs:attribute name="start_time" use="required" type="xs:dateTime"/>
      <xs:attribute name="status" use="required" type="xs:NCName"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="custom_data">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="name" use="required" type="xs:NCName"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="annotation">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="comment"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="custom_data"/>
      </xs:sequence>
      <xs:attribute name="default_file_name" use="required" type="xs:boolean"/>
      <xs:attribute name="description" use="optional"/>
      <xs:attribute name="file" use="required"/>
      <xs:attribute name="file_name" use="required"/>
      <xs:attribute name="level" use="required" type="xs:NCName"/>
      <xs:attribute name="link_file" use="required" type="xs:boolean"/>
      <xs:attribute name="mime_type" use="required"/>
      <xs:attribute name="name" use="required" type="xs:NCName"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="comment">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="custom_data"/>
      </xs:sequence>
      <xs:attribute name="label" use="required" type="xs:NCName"/>
      <xs:attribute name="priority" use="required" type="xs:NCName"/>
    </xs:complexType>
  </xs:element>
</xs:schema>