User can create multiple test cases and sections at a time using XML file. There are 2 steps processes require to import the data from XML.
While creating XML file following point must be considered
XML format should be in tree structure. It should start with Sections, test cases and Sub-section.
The XML format would be look like as following
<section> <name>Login Functionality<name> <description>All test case related to login functionality. Positive and negative test cases</description> <case> <id>C2</id> <title>Correct Username and Passwordcombination</title> <template>Test Case (Text)<template> <type>Other<type> <priority>Medium<priority> <estimate/> <references/> <custom> <preconds>Login page should display</preconds> <steps>1. Enter correct username 2.enter correct password</steps> <expected>Usershould able to login successfully.</expected> </custom> </case> </section>
The <case> tag supports all properties of a test case in TestRail such as the title, estimate, priority, text fields, pre-conditions, steps, expected result etc
Custom fields are grouped under <custom> tag.
The following table lists the import formats for the various custom field types
Type | Sample Value | Description |
---|---|---|
Checkbox | TRUE | "true" or "false" (without the quotes) |
Date | 01-07-2010 | A valid XML date string in yyyy-mm-dd format |
Dropdown | <id>5</id> | The ID of the value (as configured in the custom field options in the administration area) in an <id> tag |
Integer | 1022 | A simple integer number |
Milestone | <id>2</id> | The ID of the milestone in an <id> tag |
Multi−select |
<item> <id>1</id> </item> <item> <id>2</id> </item> |
A list of <item> records, each with its own ID (so, like a list of Dropdown values) |
Steps |
<step> <index>1</index> <content>Step 1</content> <expected>Result 1</expected> </step> <step> <index>2</index><content>Step 2</content> </step> |
A list of <step> records, each with its own index, content and optionally expected result |
String/Text | Foobar | A simple string |
URL (Link) | http//google.com/ | A simple URL as string |
User | <id>3</id> | The ID of the user in an <id> tag |
Go to Test Cases tab.
Click at import test cases icon at right side and select Import from XML option.
Following screenshot shows Import test cases icon and XML selection
It opens Import from XML wizard. Browse and upload an XML file.
User can add new test cases as well as update existing test cases.
After selection, click on Import button.
Following screenshot shows how to export XML file