テスト資産のマッピングは、migration.cfg という名前の XML ファイル経由で制御されます。 このファイルは以下の場所にあります。
<install directory>¥eclipse¥plugins¥com.ibm.rational.clearquest.testmanagement.rqmexport¥data¥RQMExport
migration.cfg ファイルでは、特定の成果物のマッピングは <field _mapping> タグの中に含まれますが、成果物内のフィールドごとの個々のマッピングは <mapping> タグにおいて定義されます。 例えば、XML コードの以下の 2 行は、Rational ClearQuest Test Manager の TMTestCase 成果物が Rational Quality Manager の TestCase 成果物にマップされ、TMTestCase 内の Headline フィールドが TestCase 内の title フィールドにマップされることを示します。
<field_mapping type="TMTestCase" target="TestCase" task="Test Cases"> <mapping from="Headline" to="dc:title"/>
フィールドのマッピングを更新するには、既存のマッピングを適切な from または to 属性設定で変更します。 新規マッピングを追加するには、既存のマッピングを複製し、必要に応じて更新します。 フィールドのマッピングを調整した後、更新されたマッピング・ファイルを使用するために、マイグレーション・ウィザードを再実行します。
migration.cfg ファイルのテスト・ケースのデフォルト・マッピングを以下に示します。<?xml version="1.0" encoding="UTF-8"?> <config> <!-- TEST CASE --> <field_mapping type="TMTestCase" target="TestCase" task="Test Cases"> <mapping from="Headline" to="dc:title"/> <mapping from="Description" to="dc:description"/> <mapping from="owner.login_name" to="jzalm:owner"/> <mapping from="State" to="jzalm:state"/> <mapping from="Notes_Log" to="myns:com.ibm.rqm.planning.editor.section.testCaseNotes extensionDisplayName="Notes"" pre="true"/> <mapping from="LegacyAcceptanceCriteria" to="myns:com.ibm.rqm.planning.editor.section.testCaseAcceptanceCriteria extensionDisplayName="Acceptance Criteria"" pre="true"/> <mapping from="LegacyPreConditions" to="myns:com.ibm.rqm.planning.editor.section.testCasePreCondition extensionDisplayName="Precondition"" pre="true"/> <mapping from="LegacyPostConditions" to="myns:com.ibm.rqm.planning.editor.section.testCasePostCondition extensionDisplayName="Postcondition"" pre="true"/> <mapping from="LegacyCustom1" to="myns:LegacyCustomField" pre="true"/> <mapping from="LegacyInputs" to="myns:LegacyInputData" pre="true"/> <mapping from="LegacyPassPoints" to="myns:LegacyPassPoints" pre="true"/> <mapping from="LegacyFailPoints" to="myns:LegacyFailPoints" pre="true"/> <mapping from="LegacyDesign" to="myns:LegacyDesign" pre="true"/> <mapping from="History" to="myns:History" pre="true"/> <mapping from="DefaultScript" to="testscript" scripttype="DefaultScriptType"/> <mapping from="ExternalMotivators" to="attachment" file="true"/> <mapping from="LegacyTotalPoints" to="weight"/> <mapping from="ConfiguredTestCases.Script" to="testscript" scripttype="ConfiguredTestCases.TestType"/> <!-- TM "properties" RAProject and Requirements_List are placeholders and can not be renamed --> <!-- <mapping from="RAProject" to="RAProject"/> --> <mapping from="Requirements_List" to="requirement"/> <mapping from="Notes_Log" to="myns:com.ibm.rqm.planning.editor.section.testCaseNotes extensionDisplayName="Notes"" pre="true"/> <mapping from="custom2" to="LegacyCustom2"/> <mapping from="custom3" to="LegacyCustom3"/> </field_mapping>
以下の表は、マッピング内に含めることができる追加のディレクティブについて説明しています。
ディレクティブ | 説明 |
---|---|
pre="true" | ベタ書き。データの書式が再設定されないように折り返します。 |
file=”true” | フィールドが Rational ClearQuest Test Manager の外部ファイルを参照することを指定します。 |
scripttype | 関連付けられたスクリプトにのみ使用されます。 |
この例では、Rational ClearQuest Test Manager のユーザー定義フィールドが Rational Quality Manager の既存のフィールドにマップされる単純な例を示します。
<mapping from="InternalName" to="dc:title"/>
この例では、InternalName という名前のユーザー定義フィールドが Rational Quality Manager の title フィールドにマップされます。
この例では、参照元の成果物のフィールドが Rational Quality Manager のフィールドにどのようにマップされるのかを示します。
<mapping from="ParentPlan.Headline" to="dc:description"/>
この例では、ParentPlan 成果物の Headine フィールドは、Rational Quality Manager の description フィールドにマップされます。
この例では、Rational ClearQuest Test Manager のユーザー定義フィールドが Rational Quality Manager のユーザー定義セクションにどのようにマップされるのかを示します。
<mapping from="InternalName" to="myns:InternalName extensionDisplayName="Internal Name"">
この例では、マッピングは依然として Rational ClearQuest Test Manager のカスタム InternalName フィールドを参照しますが、今回は InternalName という Rational Quality Manager のユーザー定義セクションにマップしています。
Rational Quality Manager のユーザー定義セクションの名前は、スペースを含まない任意の名前にすることができますが、名前の前に myns: を付ける必要があります。
この例の最後の部分 extensionDisplayName="Internal Name"" は、セクション名が Rational Quality Manager でどのように現れるかを指定します。
ここで、ユーザー定義セクション名、InternalName は内部名として表示されます。 内部名は引用符で囲む必要がありますが、これは XML ファイルに組み込まれるため、引用符は引用符のエスケープ・バージョン、つまり " に置き換える必要があります。