- 入门指南
- 项目管理
- 项目操作和实用程序
- Test Manager 设置
- ALM 工具集成
- API 集成

Test Manager 用户指南
导入项目
您可以从外部来源导入项目,以通过 Test Manager 执行测试操作。 使用此功能可将整个测试项目从不同的 Application Lifecycle Management (ALM) 系统传输到 Test Manager。
工作方式
导入项目时遵循的架构可将外部系统项目(例如测试应用程序)转换为 Test Manager 可以读取的格式。 这包括需求、测试用例、测试集、测试结果、标签、自定义字段和附件等对象。 导入流程是异步完成的。
注意事项
- 在 Test Manager 中导入期间会生成新的对象 ID (GUID)。
- 维护时间戳( “创建时间” 、 “更新时间” )。
- 创建人和更新者是指提交项目导入请求的用户。我们不会在 ALM 系统中维护创建工件的原始用户。
- 超出大小限制 (90 MB) 的文件附件将被跳过。
谁可以导入项目
任何拥有有效 Test Manager 许可证的用户都可以导入项目。
有关更多信息,请参阅“用户和组访问管理”。
Getting the schema version
您需要架构版本才能构建 TMH 文件。检索架构版本需要使用 Swagger 中的 API 调用。要检索架构版本,请执行以下步骤:
- 使用您当前使用的 Test Manager 端点转到 Swagger。要将 Swagger 连接到 Test Manager,请访问API 参考
- Go to the ProjectMigrationSchema request.
- Execute GET /api/v2/migration/schema/versions and copy the version generated in the Response Body.
- Input the copied schema version as a parameter for GET /api/v2/migration/schema/{schemaVersion} and execute the API.
- Select Download file from the Response body section.
Results: A ZIP file is downloaded, that has the schema of different testing artifacts in the TMH file. The ZIP file contains the following folders and files:
- An attachments folder - contains subfolders corresponding to the attachments associated with each object, object Id is folder name (test cases, test sets, requirements, test executions, etc.).
- An objects folder - contains subfolders corresponding to all types of objects available in Test Manager.
- A JSON manifest file - holds basic metadata about your WebExtension.
- A readme.txt file - contains instructions for preparing data that goes inside the folders.
Preparing the TMH file
准备要导入的 TMK 文件时,我们建议使用不超过 2GB 的文件。将文件大小保持在此限制内可以避免导入过程中途中止。
按照每个子文件夹中的示例架构,指定要导入 JSON 文件的所有对象。
Example: To specify a Test Case, use the sample schema below:
{
"testCases": [
{
"id": "string (100)",
"version": "string (100)",
"name": "string (100)",
"inputParams": "string",
"description": "string",
"automationId": "string (100)",
"automationTestCaseName": "string (100)",
"automationProjectName": "string (100)",
"foreignRef": "string",
"connectorTestCaseId": "string",
}
]
}
{
"testCases": [
{
"id": "string (100)",
"version": "string (100)",
"name": "string (100)",
"inputParams": "string",
"description": "string",
"automationId": "string (100)",
"automationTestCaseName": "string (100)",
"automationProjectName": "string (100)",
"foreignRef": "string",
"connectorTestCaseId": "string",
}
]
}
请务必使用与您的“测试用例”相对应的数据更改括号之间的数据 。
- 为项目中的每个对象创建 JSON 文件后,将其添加到对象文件夹中的相应子文件夹中。您可以根据需要命名 JSON 文件,但子文件夹的名称必须保持不变示例:将包含测试用例相关数据的 JSON 文件添加到测试用例子文件夹中。
重要提示:
If you have a large number of objects to import, split them into multiple files, such as
testcases-1.json, andtestcases-2.json. We recommend adding a maximum number of 500 files per subfolder. - Add the attachment files associated with the objects under the attachments folder, using the following folder hierarchy:
/attachments/object-id/file name.object-id- 将其替换为关联对象的 ID。file name- 将其替换为附件的名称。
谁可以导入项目
任何拥有有效 Test Manager 许可证的用户都可以导入项目。
有关更多信息,请参阅“用户和组访问管理”。
在 Test Manager 中导入项目
准备导出的 TMH 文件,然后在 Test Manager 中查看项目导入详细信息。
准备要导入的 TMK 文件时,我们建议使用不超过 2GB 的文件。将文件大小保持在此限制内可以避免导入过程中途中止。
- 登录到 Test Manager。
- 单击“导入项目” 。
- 添加 TMH 文件。系统会自动获取项目详细信息,并将其列在“项目中的对象”部分中,以便您在开始导入流程之前进行查看。
- (可选)编辑项目名称、前缀和说明。
- 系统会自动选中“包括测试用例的自动化信息” ,以便您导入自动化和其他相关信息。例如,链接到测试用例的自动化将与所有详细信息和测试用例步骤一起导入到 Test Manager。
- 查看信息,然后单击“导入”以开始流程。
备注:
导入项目通常需要大约 10 到 15 分钟,但较大的项目可能需要更长时间。
导入的项目将显示在“项目”页面中,在该流程完成之前显示为灰色。

导入到 Test Manager 中的现有项目
-
登录到 Test Manager。
-
选择“导入项目” 。
-
在此处添加您下载的 TMH 文件
系统会自动获取项目详细信息,并将其列在“项目文件中的对象”部分中,以便您在开始导入流程之前进行查看。
-
在“目标”下选择“现有项目” 。
-
从“项目”下拉列表中选择导入数据的目标项目。
提示:- 如果您有较大的 TMH 文件,则可以将其拆分为多个文件,并在同一目标项目中分别导入。
- 如果导出多个项目,则可以将其重新导入现有项目中。
-
系统会自动选中“包括测试用例的自动化信息” ,以便您导入自动化和其他相关信息。例如,链接到测试用例的自动化将与所有详细信息和测试用例步骤一起导入到 Test Manager。
-
查看信息,然后选择“导入”以开始流程。
警告:“测试结果”字段始终为
0,因为不会导出测试结果。
-
转到新项目的“附件”选项卡,您可以在其中查看:
- 迁移步骤日志(ZIP 文件)
- 已迁移对象的日志(ZIP 文件)
导入后步骤
导入后步骤
流程完成后,查看 Test Manager 中显示为通知的导入项目报告。导入摘要 PDF 文件以显示导入对象的状态。您可以调查对象迁移日志 csv 文件中尚未导入的单个对象。如果项目导入失败,请联系UiPath™ 支持团队。
查看自动化信息
要查看有关生成特定测试用例的自动化的信息,请执行以下操作:
-
In the Import project page, select Include automation information for test cases at the bottom.
-
Finish the import, and filter through the imported test cases, applying the automationcleared label filter.
-
Open every returned test case, and go to the Details tab to retrieve the information about the automation that generated the test case.

“详细信息”选项卡中显示的自动化信息包括:
-
自动化 ID
-
自动化项目名称
-
自动化测试用例名称
