UiPath Documentation
test-manager
latest
false
Test Manager 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

导入项目

将 TMH 文件从外部系统导入 Test Manager,作为新项目或现有项目,从而迁移需求、测试用例、测试集和附件。

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

工作方式​

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

注意事项​

  • 在 Test Manager 中导入期间会生成新的对象 ID (GUID)。
  • Time stamps (Created Time, Updated Time) are maintained.
  • 创建人和更新者是指提交项目导入请求的用户。我们不会在 ALM 系统中维护创建工件的原始用户。
  • 超出大小限制 (90 MB) 的文件附件将被跳过。
  • 自动化链接在导入过程中不会继承,因为链接取决于每个租户唯一的自动化 ID。
备注:

将项目导入其他租户后,请取消链接每个测试用例的自动化,然后将其重新链接到目标租户的 Orchestrator 中的相应自动化。否则,该测试用例的自动执行将卡在待处理状态。

谁可以导入项目​

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

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

Getting the schema version​

The schema version is required to build the TMH file, and you retrieve it with API calls in Swagger.

步骤​

  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.

结果​

A ZIP file is downloaded. It contains the schema of the different testing artifacts in the TMH file.

ZIP 文件包含以下文件夹和文件:

  • 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"
    }
  ]
}

请务必使用与您的“测试用例”相对应的数据更改括号之间的数据 。

  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 creates a new Test Manager project from an exported TMH file.

重要提示:

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

步骤​

  1. 登录到 Test Manager。
  2. 选择“导入项目” 。
  3. 添加 TMH 文件。系统会自动获取项目详细信息,并将其列在“项目中的对象”部分中,以便您在开始导入流程之前进行查看。
  4. Review the Objects in project section and check the data objects included in the project file.
  5. (Optional) To include automation as part of your import, select the Include automation information for test cases check box.
  6. (Optional) To include the project configuration as part of your import, select the Import project configuration check box.
  7. (可选)编辑项目名称、前缀和说明。
  8. 查看信息,然后选择“导入”以开始流程。
    备注:

    导入项目通常需要大约 10 到 15 分钟,但较大的项目可能需要更长时间。

  9. Review the import project report displayed in Test Manager as a notification after the process is completed. The import summary PDF file shows the status of the imported objects. You can investigate individual objects that haven't been imported in object migration log csv file.
    备注:

    If the project import fails, contact UiPath® Support.

结果​

The imported project shows up in the Projects page, grayed out until the process is completed. A Project Import Completed notification confirms the import.

导入到 Test Manager 中的现有项目​

Importing into an existing project merges the requirements, test cases, test sets, and other artifacts of a TMH file into the target project.

步骤​

  1. 登录到 Test Manager。

  2. 选择“导入项目” 。

  3. Add the TMH file that you downloaded here. Project details are automatically fetched and listed in the Objects in project file section so you can review before starting the import process.

  4. Review the Objects in project file section and check the data objects included in the project file.

  5. (Optional) To include automation as part of your import, select the Include automation information for test cases check box.

  6. (Optional) To include the project configuration as part of your import, select the Import project configuration check box.

  7. 在“目标”下选择“现有项目” 。

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

    提示:
    • 如果您有较大的 TMH 文件,则可以将其拆分为多个文件,并在同一目标项目中分别导入。
    • 如果导出多个项目,则可以将其重新导入现有项目中。
  9. 查看信息,然后选择“导入”以开始流程。

    警告:

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

  10. When the process of importing an existing project is completed, you receive a Project Import Completed notification about the event.

  11. Select the notification to go to the Attachments tab of the new project, where you can view:

    1. 迁移步骤日志(ZIP 文件)
    2. 已迁移对象的日志(ZIP 文件)
    3. 导入摘要(TXT 文件)- 显示实体的总数,以及导入或跳过的实体数量。
  12. Review the import project report displayed in Test Manager as a notification after the process is completed. The import summary PDF file shows the status of the imported objects. You can investigate individual objects that haven't been imported in object migration log csv file.

    备注:

    If the project import fails, contact UiPath® Support.

结果​

The data of the TMH file is imported into the selected project, and a Project Import Completed notification confirms the import.

查看自动化信息​

The Details tab of an imported test case shows the automation that generated it, provided that you included automation information in the import.

步骤​

  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.

    图 1.显示自动化已清除标签的“标签”下拉列表

  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 论坛

保持更新