-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Polarion XUnit tests againts the XSD schema
- Loading branch information
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<!-- | ||
This schema supports only a subset of the features provided by the | ||
`xml-junit` library. Additionally, many attributes are explicitly set as | ||
required. This is intentional to limit the currently supported features of | ||
the TMT Polarion report plugin . | ||
The Polarion `xunit.xml` is almost the same as default output of junit | ||
report plugin but it must allow definition of `properties` inside of | ||
`testsuites` (NOT `testsuite`) and `testcase`. | ||
--> | ||
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<xs:element name="failure"> | ||
<xs:complexType mixed="true"> | ||
<xs:attribute name="type" type="xs:string" use="required"/> | ||
<xs:attribute name="message" type="xs:string" use="required"/> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="error"> | ||
<xs:complexType mixed="true"> | ||
<xs:attribute name="type" type="xs:string" use="required"/> | ||
<xs:attribute name="message" type="xs:string" use="required"/> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="skipped"> | ||
<xs:complexType mixed="true"> | ||
<xs:attribute name="type" type="xs:string" use="required"/> | ||
<xs:attribute name="message" type="xs:string" use="required"/> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element name="system-err" type="xs:string"/> | ||
<xs:element name="system-out" type="xs:string"/> | ||
|
||
<xs:element name="properties"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element ref="property" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="property"> | ||
<xs:complexType> | ||
<xs:attribute name="name" type="xs:string" use="required"/> | ||
<xs:attribute name="value" type="xs:string" use="required"/> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="testcase"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element ref="skipped" minOccurs="0" maxOccurs="1"/> | ||
<xs:element ref="error" minOccurs="0" maxOccurs="1"/> | ||
<xs:element ref="failure" minOccurs="0" maxOccurs="1"/> | ||
<xs:element ref="system-out" minOccurs="0" maxOccurs="1"/> | ||
<xs:element ref="system-err" minOccurs="0" maxOccurs="1"/> | ||
<xs:element ref="properties" minOccurs="0" maxOccurs="1"/> | ||
</xs:sequence> | ||
<xs:attribute name="name" type="xs:string" use="required"/> | ||
<xs:attribute name="time" type="xs:string" use="optional"/> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="testsuite"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element ref="testcase" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
<xs:attribute name="name" type="xs:string" use="required"/> | ||
<xs:attribute name="tests" type="xs:string" use="required"/> | ||
<xs:attribute name="failures" type="xs:string" use="required"/> | ||
<xs:attribute name="errors" type="xs:string" use="required"/> | ||
<xs:attribute name="disabled" type="xs:string" use="required"/> | ||
<xs:attribute name="skipped" type="xs:string" use="required"/> | ||
<xs:attribute name="time" type="xs:string" use="required"/> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:element name="testsuites"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element ref="testsuite" minOccurs="1" maxOccurs="1"/> | ||
<xs:element ref="properties" minOccurs="0" maxOccurs="1"/> | ||
</xs:sequence> | ||
<xs:attribute name="time" type="xs:string" use="required"/> | ||
<xs:attribute name="tests" type="xs:string" use="optional"/> | ||
<xs:attribute name="failures" type="xs:string" use="optional"/> | ||
<xs:attribute name="disabled" type="xs:string" use="optional"/> | ||
<xs:attribute name="errors" type="xs:string" use="optional"/> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
summary: Check for xUnit output | ||
enabled: false # needs pylero, so just for local testing | ||
require+: | ||
# To support xmllint tool | ||
- libxml2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters