Testrail-import-testcases-xml
提供:Dev Guides
TestRail-TestCases XMLのインポート
ユーザーは、XMLファイルを使用して、一度に複数のテストケースとセクションを作成できます。 XMLからデータをインポートするには、プロセスに必要な2つのステップがあります。
- XMLファイルのルール
- ファイルをシステムにインポートします
XMLファイルのルール
次の点を考慮してXMLファイルを作成する際に考慮する必要があります
- XML形式はツリー構造にする必要があります。 セクション、テストケース、サブセクションから開始する必要があります。
- XML形式は次のようになります
<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>
- <case>タグは、タイトル、見積もり、優先度、テキストフィールド、前提条件、ステップ、期待される結果など、TestRailのテストケースのすべてのプロパティをサポートします。
- カスタムフィールドは<custom>タグの下にグループ化されます。
- 次の表に、さまざまなカスタムフィールドタイプのインポート形式を示します
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 |
|
A list of <item> records, each with its own ID (so, like a list of Dropdown values) |
Steps |
|
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 |
CSVファイルをインポート
- [テストケース]タブに移動します。
- 右側のインポートテストケースアイコンをクリックし、[XMLからインポート]オプションを選択します。
次のスクリーンショットは、テストケースのインポートアイコンとXMLの選択を示しています
- [XMLからインポート]ウィザードが開きます。 XMLファイルを参照してアップロードします。
- ユーザーは、新しいテストケースを追加したり、既存のテストケースを更新したりできます。
- 選択後、[インポート]ボタンをクリックします。
次のスクリーンショットは、XMLファイルをエクスポートする方法を示しています