UiPath Documentation
test-manager
2024.10
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Test Manager 用户指南

上次更新日期 2026年4月22日

导入项目

您可以从外部来源导入项目,以通过 Test Manager 执行测试操作。 使用此功能可将整个测试项目从不同的 Application Lifecycle Management (ALM) 系统传输到 Test Manager。

工作方式

导入项目时遵循的架构可将外部系统项目(例如测试应用程序)转换为 Test Manager 可以读取的格式。 这包括需求、测试用例、测试集、测试结果、标签、自定义字段和附件等对象。 导入流程是异步完成的。

注意事项

  • 在 Test Manager 中导入期间会生成新的对象 ID (GUID)。
  • 维护时间戳( “创建时间”“更新时间” )。
  • Created By, and Updated By refer to the user who submitted the project import request. We do not maintain the original user who created the artifact in the ALM system.
  • 超出大小限制 (90 MB) 的文件附件将被跳过。

谁可以导入项目

任何拥有有效 Test Manager 许可证的用户都可以导入项目。

有关更多信息,请参阅“用户和组访问管理”。

Getting the schema version

You need the schema version to build the TMH file. Retrieving the schema version involves using API calls in Swagger. To retrieve the schema version, follow the steps below:

  1. 使用您当前使用的 Test Manager 端点转到 Swagger。要将 Swagger 连接到 Test Manager,请访问API 参考
  2. Go to the ProjectMigrationSchema request.
  3. Execute GET /api/v2/migration/schema/versions and copy the version generated in the Response Body.
  4. Input the copied schema version as a parameter for GET /api/v2/migration/schema/{schemaVersion} and execute the API.
  5. 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",
    }
  ]
}

Make sure to change the data between parentheses with the data corresponding to your Test Case.

  1. 为项目中的每个对象创建 JSON 文件后,将其添加到对象文件夹中的相应子文件夹中。您可以根据需要命名 JSON 文件,但子文件夹的名称必须保持不变示例:将包含测试用例相关数据的 JSON 文件添加到测试用例子文件夹中。
    重要提示:

    If you have a large number of objects to import, split them into multiple files, such as testcases-1.json, and testcases-2.json. We recommend adding a maximum number of 500 files per subfolder.

  2. 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 许可证的用户都可以导入项目。

有关更多信息,请参阅“用户和组访问管理”。

Importing a project in Test Manager

准备导出的 TMH 文件,然后在 Test Manager 中查看项目导入详细信息。

重要提示:

准备要导入的 TMK 文件时,我们建议使用不超过 2GB 的文件。将文件大小保持在此限制内可以避免导入过程中途中止。

  1. 登录到 Test Manager。
  2. Click Import project.
  3. Add the TMH file. Project details are automatically fetched and listed in the Objects in project section so you can review before starting the import process.
  4. (可选)编辑项目名称、前缀和说明。
  5. Include automation information for test cases is automatically selected so you can import automation and other relevant information. For example, an automation linked to a test case will be imported to Test Manager with all the details and test case steps.
  6. Review information and click Import to start the process.
    备注:

    Importing the project typically takes around 10-15 minutes, but it might take longer for larger projects.

The imported project shows up in the Projects page, grayed out until the process is completed.

文档图像

导入到 Test Manager 中的现有项目

  1. 登录到 Test Manager。

  2. 选择“导入项目”

  3. 在此处添加您下载的 TMH 文件

    系统会自动获取项目详细信息,并将其列在“项目文件中的对象”部分中,以便您在开始导入流程之前进行查看。

  4. “目标”下选择“现有项目”

  5. “项目”下拉列表中选择导入数据的目标项目。

    提示:
    • 如果您有较大的 TMH 文件,则可以将其拆分为多个文件,并在同一目标项目中分别导入。
    • 如果导出多个项目,则可以将其重新导入现有项目中。
  6. Include automation information for test cases is automatically selected so you can import automation and other relevant information. For example, an automation linked to a test case will be imported to Test Manager with all the details and test case steps.

  7. 查看信息,然后选择“导入”以开始流程。

    警告:

    “测试结果”字段始终为0 ,因为不会导出测试结果。

    文档图像

  8. 转到新项目的“附件”选项卡,您可以在其中查看:

    1. 迁移步骤日志(ZIP 文件)
    2. 已迁移对象的日志(ZIP 文件)

导入后步骤

导入后步骤

流程完成后,查看 Test Manager 中显示为通知的导入项目报告。导入摘要 PDF 文件以显示导入对象的状态。您可以调查对象迁移日志 csv 文件中尚未导入的单个对象。如果项目导入失败,请联系UiPath™ 支持团队

查看自动化信息

要查看有关生成特定测试用例的自动化的信息,请执行以下操作:

  1. In the Import project page, select Include automation information for test cases at the bottom.

  2. Finish the import, and filter through the imported test cases, applying the automationcleared label filter.

  3. Open every returned test case, and go to the Details tab to retrieve the information about the automation that generated the test case.

    文档图像

“详细信息”选项卡中显示的自动化信息包括:

  • 自动化 ID

  • 自动化项目名称

  • 自动化测试用例名称

    文档图像

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新