Creating an XSD schema and Modules

To use XSD files, you first must open XSD files in API Scan and export them as XML/JSON TestCases. To do so, complete the following steps:

  1. Launch API Scan.

  2. Scan a file, in this case, XSD files.

  3. Export your messages to Tosca Commander as XML/JSON Test Case. Once you have exported the messages, you can use them to run your tests.

Example

The example below shows an XSD schema that describes the structure of an XML document and how both the schema and the Modules are displayed in Tosca Commander™ after scanning them with API Scan.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="employee" type="fullpersoninfo"/>
  <xs:complexType name="personinfo">
    <xs:sequence>
      <xs:element name="firstname" type="xs:string"/>
      <xs:element name="lastname" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="fullpersoninfo">
    <xs:complexContent>
      <xs:extension base="personinfo">
        <xs:sequence>
          <xs:element name="address" type="xs:string"/>
          <xs:element name="city" type="xs:string"/>
          <xs:element name="country" type="xs:string"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType> 
</xs:schema> 

Modules in Tosca Commander™