UiPath Documentation
test-manager
latest
false

Test Manager 用户指南

上次更新日期 2026年5月7日

SAP Cloud ALM

将 SAP Cloud ALM 项目集成到 Test Manager,以创建测试项目、测试用例,执行测试并查看详细的执行信息。该集成可帮助您通过 Test Manager 在 SAP Cloud ALM 实例中管理和执行自动化测试。

支持的测试场景

将 SAP Cloud ALM 与 Test Manager 集成时,您可以执行以下测试活动:

  • 测试用例创建:
    • 在 SAP Cloud ALM 中创建自动化测试用例,您稍后可以在 Test Manager 中为其分配 Studio 自动化。
    • 在 Test Manager 中创建与目标 SAP Cloud ALM 项目同步的自动化测试用例。
  • 测试用例执行:
    • 通过 SAP Cloud ALM 界面在 Test Manager 中执行自动化测试用例。
    • 在 Test Manager 中独立于 SAP Cloud ALM 界面执行自动化测试用例。
  • 测试用例报告:
    • 有关详细信息,从 SAP Cloud ALM 直接导航到 Test Manager 中的测试执行视图。

将 SAP Cloud ALM 与 Test Manager 集成

执行以下步骤以将 SAP Cloud ALM 与 Test Manager 集成:

1. 新建服务

有关手动创建服务的更多信息,请访问 SAP Cloud ALM 文档中的手动创建服务

  1. 在“SAP Cloud ALM”中,转到“管理” ,然后转到“布局管理”
  2. 打开服务和系统页面。
  3. 选择“添加” ,然后选择“新建云服务”
  4. 使用所需参数配置新的 UiPath 服务,如下所示:
    1. “名称” :输入UiPath
    2. Description: Input UiPath Test Suite.
    3. 系统编号(默认) : 输入 SAP 环境中可用的系统编号。
    4. “服务类型”:选择“未指定 Cloud Service (HTTP)”
    5. 角色:选择“测试”
  5. 选择“保存”以确认新服务。

2. 添加新的端点

端点用于创建与先前创建的服务的经过身份验证的连接。有关更多信息,请访问 SAP Cloud ALM 文档中的添加端点

先决条件

  1. 在要将 SAP Cloud ALM 连接到的 UiPath 组织中创建一个外部应用程序。
    备注:

    配置端点的身份验证类型时使用应用程序 ID密码 ID (在“应用程序密码”下)。

For more information about creating and managing external applications, visit Managing external OAuth applications. 2. Important: Assign the following Test Manager user and application scopes to the previously created external application.

重要提示:

此步骤对于 SAP Cloud ALM 集成正常运行至关重要。您需要分配的作用域包括:

  1. TM.Projects
  2. TM.TestSets
  3. TM.TestCase
  4. TM.TestExecutions
  5. TM.自定义字段定义
  6. TM.CustomFieldValues有关 Test Manager 作用域的更多信息,请访问API 作用域
  7. “重定向 URL”字段中,输入https://www.uipath.com
  8. “服务和系统”页面中,选择先前创建的服务。
  9. “端点”下,选择“添加”
  10. “添加端点”弹出窗口中,配置以下参数:
    1. 端点名称:此参数自动生成。将值更改为UiPath
    2. 用例: UiPath 服务支持的用例是测试自动化
    3. 根 URL :输入要在其中创建测试用例的租户的 Test Manager URL,后跟api后缀。

For example: https://cloud.uipath.com/{organizationName}/{tenantName}/testmanager_/api. 4. Authentication Type: Select OAuth2ClientCredentials. 1. Client ID: Input the value of App ID from the previously created external application. 2. Client Secret: Input the value of Secret ID from the previously created external application. 3. Token Service URL: Input the UiPath® Identity Server endpoint of type Token: https://cloud.uipath.com/identity_/connect/token. For a list of Identity server endpoints, visit UiPath Identity Server Endpoints. 4. Select Save to confirm the new endpoint.

这些配置可确保 SAP Cloud ALM 和 Test Manager 系统可以通信和同步。

使用 SAP Cloud ALM 和 Test Manager

将 SAP Cloud ALM 与 Test Manager 集成后,您可以执行测试操作,例如创建测试用例、执行测试用例以及查看执行结果。 以下部分演示了集成的端到端流程。

创建测试用例

SAP Cloud ALM 和 Test Manager 的集成仅适用于自动化测试用例。

概述

创建自动化测试用例时,SAP Cloud ALM 同时会在连接的 Test Manager 实例中创建一个新项目。 项目名称与 SAP Cloud ALM 中的项目名称相同,并且在末尾有一个唯一 ID。 该项目还包含您创建的新测试用例。 当您决定使用与初始测试用例相同的配置创建更多测试用例时,SAP Cloud ALM 会在先前生成的项目中创建一个新的测试用例。

在 SAP Cloud ALM 和 Test Manager 中同时创建的测试用例是在特定上下文中创建的。SAP Cloud ALM 上下文存储在 Test Manager 项目中的以下自定义字段中:(仅限 SAP)、“SAP 国家/地区” (默认)、 “SAP 作用域”“SAP 解决方案流程” 。这些参数在 SAP Cloud ALM 和 Test Manager 中的测试用例之间建立了适当的映射和上下文。这些自定义字段可以包含多个值,具体取决于您同步到 Test Manager 项目的作用域和相应流程的数量。

如果您需要在 Test Manager 中创建应同步到 SAP Cloud ALM 的测试用例,请为前面提到的自定义字段选择适当的上下文。

在 SAP Cloud ALM 中创建自动化测试用例

要直接从 SAP Cloud ALM 在 Test Manager 中触发自动化测试用例的创建,请执行以下步骤:

  1. 转到“SAP Cloud ALM”,然后从“项目”下拉列表中选择现有项目或创建一个专用项目,用于与 Test Manager 集成。
  2. 转到测试准备应用。
  3. “测试用例”部分中,选择“创建测试用例” 。按如下方式配置测试用例:
    1. “类型”:选择“自动化” 。该集成有助于您在 SAP Cloud ALM 中为您的业务解决方案创建、管理和执行自动化测试用例。
    2. 自动化提供程序:从下拉列表中选择UiPath Test Suite端点。
    3. 标题 (可选) :输入所需范围内的唯一标题。
    4. 作用域(全部) :选择作用域。此值作为SAP 作用域自定义字段出现在 Test Manager 中。
    5. 解决方案流程(可选)选择一个解决方案流程。此值在 Test Manager 中作为SAP 解决方案流程自定义字段显示。
    6. 国家/地区:如果选择了解决方案流程,则必须选择所需的国家或地区。此值在 Test Manager 中作为SAP 国家/地区自定义字段显示。
  4. 选择“保存”以确认测试用例创建。
  5. 从 SAP Cloud ALM 转到 Test Manager,转到新创建的测试用例。
    1. 在 Test Manager 项目中,转到“项目设置” ,然后选择“自动化”选项卡。
    2. 将默认的 Orchestrator 文件夹分配给通过 SAP Cloud ALM 创建的项目:
      1. 选择“默认文件夹”下拉列表。
      2. 选择首选的 Orchestrator 文件夹。
      3. 选择“保存”以确认更改。选定的文件夹用于执行所有测试。
        备注:

        此步骤只需执行一次,即在创建关联的 Test Manager 项目后立即执行。

有关在 SAP Cloud ALM 中创建自动化测试用例的更多信息,请访问创建自动化测试用例

在 Test Manager 中创建自动化测试用例

要从 Test Manager 触发 SAP Cloud ALM 中的自动化测试用例的创建,请执行以下步骤:

  1. 打开您在前面的步骤中从 SAP Cloud ALM 创建的 Test Manager 项目。
  2. 在左侧导航面板中,转到“测试用例”。
  3. 选择“创建测试用例”
  4. 按如下方式配置测试用例:
    1. 名称(可选) :输入测试用例的名称。
    2. 版本:(可选)向测试用例添加版本标签。
    3. 说明:(可选)输入测试用例的说明。
    4. 标签:添加自定义标签。
  5. 选择“创建”以确认新的测试用例。
  6. 打开新创建的测试用例,然后转到“详细信息”选项卡。
  7. 在以下自定义字段中为 SAP Cloud ALM 目标项目选择相关值:
    1. SAP 国家/地区:选择目标国家/地区。这是要测试解决方案流程的等效国家/地区。

    2. SAP 作用域 (可选):选择所需的作用域。这与您在 SAP Cloud ALM 项目中测试的等效作用域相同。

    3. SAP 解决方案流程“选择目标解决方案流程”。这是您在 SAP Cloud ALM 项目中测试的等效解决方案流程。

      备注:

      如果您的 Test Manager 项目包含多个 SAP 作用域和流程值,请确保所选流程对应于所选作用域。Test Manager 不会根据SAP 作用域值自动筛选SAP 解决方案流程。:::通过为SAP 作用域SAP 解决方案流程SAP 国家/地区选择适当的值,可以确保在同步相同的作用域和流程时,Test Manager 中创建的测试用例将与 SAP Cloud ALM 同步。

        Figure 1. The custom field values related to SAP in a Test Manager test case
      
        ![The custom field values related to SAP in a Test Manager test case](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-the-custom-field-values-related-to-sap-in-a-test-manager-test-case-506870-031be3e1-2e790b26.webp)
      
        For more information about creating test cases in Test Manager, visit [Create test cases](https://docs.uipath.com/test-manager/automation-cloud/latest/user-guide/creating-test-cases).
      
        #### Synchronizing test cases from Test Manager to SAP Cloud ALM
      
        :::note[For synchronizing automated test cases from Test Manager to SAP Cloud ALM, ensure to select appropriate values for the custom fields **SAP Country/Region**, **SAP Scope**, **SAP Solution Process** in the Test Manager test cases you wish to synchronize.]
        :::
        Figure 1. The custom field values related to SAP in a Test Manager test case
      
        ![The custom field values related to SAP in a Test Manager test case](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-the-custom-field-values-related-to-sap-in-a-test-manager-test-case-506870-031be3e1-2e790b26.webp)
      
        For more information about creating test cases in Test Manager, visit [Create test cases](https://docs.uipath.com/zh-CN/test-manager/automation-cloud/latest/user-guide/creating-test-cases).
      
        #### Synchronizing test cases from Test Manager to SAP Cloud ALM
      
        :::note[For synchronizing automated test cases from Test Manager to SAP Cloud ALM, ensure to select appropriate values for the custom fields **SAP Country/Region**, **SAP Scope**, **SAP Solution Process** in the Test Manager test cases you wish to synchronize.]
        :::
      
步骤

要同步在连接的 SAP Cloud ALM 项目中的 Test Manager 中创建的测试用例,请执行以下步骤:

  1. 打开 SAP Cloud ALM 项目,然后转到TestPreparation应用程序。
  2. “测试用例”部分中,选择“同步自动化测试用例”

Figure 2. The Synchronize Automated Test Cases button

同步自动化测试用例按钮 3. Select the scope for which you want to synchronize automated test cases.

备注:

此值必须与用于在 Test Manager 中创建新的自动化测试用例的作用域匹配。

例如,如果您在 Test Manager 中使用Scope 3创建了自动化测试用例,请确保在同步测试用例时,在 SAP Cloud ALM 中选择相同的Scope 3作用域。4. 选择自动化提供程序 ( UiPath Test Cloud ),这是您用于创建自动化测试的端点。5. 选择“同步”以完成该过程。

有关将自动化测试用例从 Test Manager 同步到 SAP Cloud ALM 的更多信息,请访问同步自动化测试用例

向测试用例分配测试自动化

使用 UiPath™ Studio 创建测试自动化或将自动化分配给 Test Manager 中的现有测试用例。

步骤
  1. 在 Studio 中,打开现有项目或创建一个新项目。
  2. 将此项目连接到 Test Manager 实例。
    1. “设计”功能区中,选择“Test Manager”
    2. 选择Test Manager 设置
    3. 输入与 SAP Cloud ALM 同步的 Test Manager 实例的基本 URL。
    4. Select Connect.
    5. 连接成功后,在“默认项目”字段中,输入目标 Test Manager 项目的名称或前缀。
  3. 为您的解决方案流程创建和设计测试用例。请访问 Studio 测试的“简介”页面,探索可用的测试设计功能。
  4. 转到项目的“项目”面板,然后右键单击一个测试用例。
  5. 选择“关联到 Test Manager”
  6. “链接到 Test Manager”弹出窗口中,提供以下测试信息:
    1. 项目:选择包含现有测试用例或将创建新测试用例的项目。如果在将 Studio 连接到 Test Manager 时选择了默认项目,则此项目将显示在“项目”字段中。
    2. 测试:输入所选项目中现有测试用例的名称。要创建新的测试用例,请选中默认的<new test case>值。
    3. 名称:要创建新的测试用例,请在“测试”字段中保留<new test case> ,并在 Test Manager 中为新测试用例命名。
    4. 要求:(可选)输入现有需求的名称并将其分配给测试用例。如果您不想分配要求,请选中<none>值。
  7. 选择“确定”以保存更改。

已执行的测试用例

您可以直接从 SAP Cloud ALM 和 Test Manager 执行自动化测试用例。 执行结果显示在 SAP Cloud ALM 和 Test Manager 中。

有关如何在 SAP Cloud ALM 中执行自动化测试用例的详细步骤,请访问执行自动化测试用例

执行结果

您可以从 SAP Cloud ALM 和 Test Manager 实时查看执行状态和数据。执行测试用例后,您可以在 SAP Cloud ALM 和 Test Manager 中查看执行状态。

当您仍在 SAP Cloud ALM 中测试用例的“已执行测试运行”部分时,选择“打开执行日志”以直接导航到 Test Manager 中该测试用例的执行日志。

将正在进行的执行状态从 Test Manager 同步到 SAP

在 SAP Cloud ALM 中触发测试用例的执行后,您可以在测试用例列表中跟踪测试运行的状态和进度。您可以通过选择来刷新测试运行的状态和进度。从自动化提供程序刷新测试进度从自动化提供程序刷新测试进度

将已完成的执行状态从 Test Manager 同步到 SAP

在 Test Manager 中完成测试用例的执行后,可以将其与 SAP Cloud ALM 同步。为此,请导航到您的 SAP Cloud ALM 项目并选择Test Execution应用程序。在“测试用例”部分中,选择所需的测试用例,然后选择从自动化提供程序刷新已执行的测试运行从自动化提供程序刷新已执行的测试运行。此操作会更新 SAP Cloud ALM 中的执行状态,以与 Test Manager 中的执行状态相符。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新