XSD for TestPlan XML import

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
oscfra
TestLink user
Posts: 3
Joined: Fri Jul 08, 2011 9:01 am

XSD for TestPlan XML import

Post by oscfra »

Hi,

Currently the XML file format description is only in the TestLink documentation.
Please find below an XSD file I have created to reflect the expected XML format during TestPlan imports.

This file could be used in 2 cases:
- Prior to any XML import, the Php XML library used in TestLink could be associated to this XSD file to detect any inconsistencies in the format of the submitted XML file and display a proper error message in case.
- It would be also useful for the user to have a link to this XSD file in addition to the XML file format description.

Thanks for this impressive software.

Regards,
Oscar

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="version" type="xs:unsignedInt"/>

<xs:element name="value">

<xs:simpleType>

<xs:restriction base="xs:string"/>

</xs:simpleType>

</xs:element>

<xs:element name="testsuites">

<xs:complexType>

<xs:sequence>

<xs:element ref="testsuite"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="testsuite">

<xs:complexType>

<xs:sequence>

<xs:element ref="node_order"/>

<xs:element ref="details"/>

<xs:choice>

<xs:element ref="testcase"/>

<xs:element ref="testsuite"/>

</xs:choice>

</xs:sequence>

<xs:attribute name="name" type="xs:string" use="required"/>

</xs:complexType>

</xs:element>

<xs:element name="testproject">

<xs:complexType>

<xs:sequence>

<xs:element ref="name"/>

<xs:element ref="internal_id"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="testplan">

<xs:complexType>

<xs:sequence>

<xs:element ref="name"/>

<xs:element ref="testproject"/>

<xs:element ref="build"/>

<xs:element ref="testsuites"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="testcase">

<xs:complexType>

<xs:sequence>

<xs:element ref="node_order"/>

<xs:element ref="externalid"/>

<xs:element ref="version"/>

<xs:element ref="summary"/>

<xs:element ref="preconditions"/>

<xs:element ref="execution_type"/>

<xs:element ref="importance"/>

<xs:element ref="steps"/>

<xs:element ref="custom_fields"/>

</xs:sequence>

<xs:attribute name="name" type="xs:string" use="required"/>

<xs:attribute name="internalid" type="xs:unsignedInt" use="required"/>

</xs:complexType>

</xs:element>

<xs:element name="summary" type="xs:string"/>

<xs:element name="steps">

<xs:complexType>

<xs:sequence>

<xs:element ref="step" maxOccurs="unbounded"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="step_number">

<xs:simpleType>

<xs:restriction base="xs:unsignedInt"/>

</xs:simpleType>

</xs:element>

<xs:element name="step">

<xs:complexType>

<xs:sequence>

<xs:element ref="step_number"/>

<xs:element ref="actions"/>

<xs:element ref="expectedresults"/>

<xs:element ref="execution_type"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="preconditions" type="xs:string"/>

<xs:element name="node_order">

<xs:simpleType>

<xs:restriction base="xs:unsignedInt">

<xs:minInclusive value="1"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="name">

<xs:simpleType>

<xs:restriction base="xs:string"/>

</xs:simpleType>

</xs:element>

<xs:element name="internal_id" type="xs:unsignedInt"/>

<xs:element name="importance">

<xs:simpleType>

<xs:restriction base="xs:unsignedInt">

<xs:minInclusive value="1"/>

<xs:maxInclusive value="3"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="externalid" type="xs:unsignedInt"/>

<xs:element name="expectedresults" type="xs:string"/>

<xs:element name="execution_type">

<xs:simpleType>

<xs:restriction base="xs:unsignedInt">

<xs:minInclusive value="1"/>

<xs:maxInclusive value="2"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="details">

<xs:complexType>

<xs:sequence>

<xs:element ref="custom_fields"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="custom_fields">

<xs:complexType>

<xs:sequence>

<xs:element ref="custom_field" maxOccurs="unbounded"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="custom_field">

<xs:complexType>

<xs:sequence>

<xs:element ref="name"/>

<xs:element ref="value"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="build">

<xs:complexType>

<xs:sequence>

<xs:element ref="name"/>

<xs:element ref="internal_id"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="actions" type="xs:string"/>

</xs:schema>
fman
Member of TestLink Community
Posts: 3106
Joined: Tue Nov 15, 2005 7:19 am

Re: XSD for TestPlan XML import

Post by fman »

1. thanks for your work
2. do not use forum to communicate with dev team to suggest improvements but use mantis
3. using xsd is not our priority right now, and in addition we do only basic, very basic use of XML => just XML no XSD
Rorke
TestLink user
Posts: 6
Joined: Thu Jul 07, 2011 1:03 pm
Location: UK

Re: XSD for TestPlan XML import

Post by Rorke »

Hi fman - is this forum still active?
I seem unable to pm anyone and no one ever replies.
There are no active posts in last 7 days.
I need to know if TestLink is a viable tool, however I cannot find out much from this forum.
If it is still a live project, is there a better forum you can suggest?
Thanks
Simon
Rgds
Simon
fman
Member of TestLink Community
Posts: 3106
Joined: Tue Nov 15, 2005 7:19 am

Re: XSD for TestPlan XML import

Post by fman »

1. this is not the way to ask for some feedbak i.e vampirizing another post
2. forum is absolutely live, do nor think no post in last 7 days is a measure to understand if a tool is used or not => go to sourceforge and look to last release date and download statistics.
Post Reply