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

选择自动化

使用推荐的直接选择方法,将 Orchestrator 发布的自动化链接到 Test Manager 中的测试用例。

To link automations with test cases, select an automation published to Orchestrator. Selecting an Orchestrator automation directly in Test Manager is the recommended method to connect an automation to a test case.

Orchestrator automations include packages published by the tm pack command of the UiPath Command Line Interface (CLI) from Playwright projects, not only packages published from Studio — refer to Playwright test automation. Test Manager falls back to automations linked from Studio if you have not selected an Orchestrator automation.

此外,如果测试用例仅链接 Studio 自动化,而未链接 Orchestrator 自动化,则 Test Manager 将尝试在 Orchestrator 中查找等效自动化以执行执行。

备注:

如果 Test Manager 测试用例同时链接到 Studio 和 Orchestrator 中的自动化,则从 Orchestrator 选择的自动化优先于从 Studio 链接的自动化。

先决条件

备注:

如果您直接在 Test Manager 中选择自动化,且在启用了“允许执行旧版上下文”设置时(例如,在项目或测试集级别未选择任何执行文件夹时),则不考虑所选自动化。因此,如果您想直接在 Test Manager 中选择自动化,我们建议您禁用“允许旧版执行上下文”租户设置。

要从 Orchestrator 中选择自动化,请确保执行以下步骤:

  • 将 Studio 项目发布到租户包订阅源或另一个 Orchestrator 文件夹订阅源。
  • For a Playwright package, package the project with the UiPath CLI instead — refer to Packaging Playwright projects for Test Manager. The same Orchestrator folder role and permission prerequisites apply identically to Playwright packages.
  • 为自己分配以下角色之一:
    • 自动化用户Orchestrator 文件夹角色
    • 具有管理权限的任何默认角色
    提示:

    首先,用户需要编辑测试用例的权限,以便直接在 Test Manager 中选择自动化。在此上下文中,其他有用的权限包括拥有Automation User角色或任何具有管理权限的角色。

有关默认租户角色的更多信息,请访问租户默认角色

步骤

要为测试用例选择自动化,请执行以下步骤:

  1. 转到项目的“测试用例”部分。
  2. 打开测试用例。
  3. 选择“自动化”选项卡。
  4. 选择“配置自动化” 。此操作将打开“配置自动化”右侧菜单。
    1. “包来源”下拉列表中,从相应的 Orchestrator 实例中选择一个订阅源。此订阅源应包含您打算链接到 Test Manager 测试用例的 Studio 测试用例。默认选择为“租户包订阅源”(租户包订阅源) 。只有自带订阅源的文件夹才会显示在包来源下拉列表中。在文件夹层次结构中,下拉列表中仅显示父文件夹,因为所有子文件夹共享相同的订阅源。
      备注:

      可用的包订阅源选项是您具有管理权限的选项。

    2. 选择包订阅源后,可以从该位置选择自动化。

自动化名称将显示在“测试用例名称”列下,已发布的包名称将显示在“包”列下。

备注:

“测试用例名称”列显示在 Orchestrator 中将自动化发布到的文件夹,后跟自动化名称。例如,如果您想选择从 Studio 发布到 Orchestrator 中Accounts文件夹的Create Checking Account测试用例,则此自动化的测试用例名称将为Accounts/Create Checking Account

  1. 选择“保存”以确认更改。

Automations display a Source value of Playwright or UiPath in the picker, sorted by last-updated timestamp. For a Playwright automation, the Test Case Name column shows the full spec file path, followed by the describe-chain and test title (for example, tests/checkout.spec.ts > Checkout > cancelling the information step returns...), capped at 255 characters — refer to Playwright test case fields.

Playwright projects for test sets

When adding packages to a test set (Configure Automation > Add Packages), a Playwright package exposes a Playwright Projects dropdown listing the Playwright projects defined in that package's playwright.config.ts. Selecting one or more projects scopes the test set's execution to only the tests belonging to those projects, instead of running every test case in the set.

Because the dropdown is populated from the specific package added to the test set, the list of available projects is scoped to that package at that version:

  • Adding a newer version of the same package as its own entry surfaces that version's project list, rather than merging with an older version's selection.
  • Switching the version in the panel refreshes the available-projects list to that version's.
  • Each execution freezes the package, version, and selected projects into a snapshot at creation time — re-executions replay that exact selection even if the test set is edited afterward.

从 Orchestrator 包订阅源中选择自动化后,您可以在 Automation Assigned(分配的自动化)下的以下字段中查看自动化详细信息:

  • “包测试用例名称” :在 Orchestrator 中要将自动化发布到的文件夹,后跟自动化名称: FolderName/TestCaseName

  • Package Name(包名称):用于发布所选自动化的包的名称。* Package Source(包源):您发布包的 Orchestrator 订阅源。

更新自动化

要更新从 Orchestrator 订阅源中选择的自动化,请执行以下步骤:

  1. 转到项目的“测试用例”部分。
  2. 打开测试用例。
  3. 选择“自动化”选项卡。
  4. 选择“更新自动化” 。此操作将打开“配置自动化”右侧菜单。
    1. “包来源”下拉列表中,从相应的 Orchestrator 实例中选择一个订阅源。此订阅源包含您要与 Test Manager 测试用例链接的 Studio 测试用例。默认选择为“租户包订阅源”(租户包订阅源)
      备注:

      可用的包订阅源选项是您拥有管理权限的选项。

    2. 选择包订阅源后,您可以从该位置选择自动化。自动化名称显示在“测试用例名称”下,已发布的包名称显示在“包”下。
  5. 选择“保存”以确认更改。

These same steps point a test case to a newer Playwright package version. Prior execution history is preserved across the update.

转移测试用例

If you need to transfer your test cases to a different tenant, the Orchestrator automations selected for each test case are preserved when you export and then re-import the test cases in another tenant, including automations selected from Playwright packages. For more information on exporting test cases and importing test artefacts, visit Exporting test cases and Import project.

后续步骤

要执行包含使用从 Orchestrator 选择的自动化的测试用例的测试集,您可以指定特定的包和版本来运行测试用例。 这允许 Test Manager 仅使用选定的包和版本执行 Orchestrator 订阅源中多个包中链接到自动化的测试用例。

有关配置特定执行文件夹以及选择包和版本的更多信息,请访问为特定执行文件夹和机器人配置测试集

结果

自动化已关联到测试用例。包和测试用例名称会显示在 Automation(自动化)选项卡的 Automation Assigned(分配的自动化)下,测试用例已准备好进行自动化执行。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新