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

启用执行顺序

为在测试集和执行中静态分配的测试用例设置固定的执行顺序,每个级别的排序独立运行。

您可以为测试集或测试执行中的测试用例设置特定的执行顺序。此顺序将确定测试用例最初运行的顺序。但是,对测试执行中的顺序进行的任何更改都不会影响测试集中的顺序。因此,您在测试集和测试执行中设置的顺序彼此独立。

备注:

您只能为静态分配的测试用例强制执行特定的执行顺序,只有在静态分配的测试用例完成后,动态分配的测试用例才会以随机顺序紧随其后。即使已启用“强制执行顺序” ,测试集的“测试用例”选项卡或测试执行的“结果”选项卡下的“重新排序”按钮也仅对角色包括“测试集编辑”权限的用户可见。

步骤​

  1. 确定要在项目中对测试用例重新排序的位置:
    • 在测试集中。
    • 在测试执行中。
  2. 启用“启用执行顺序”切换开关。
    • 转到“测试集” ,然后转到“配置”选项卡,然后选择“启用执行顺序”开关。
    • 或者,如果要在测试执行中重新排序,请转到“执行” ,然后转到“设置”选项卡,并启用“启用执行顺序”切换开关。
  3. 启用执行顺序后,返回到查看测试用例的选项卡。根据您激活强制措施的位置,请按照以下步骤操作:
    • 如果您位于“测试集”中,请返回“测试用例”并选择“重新排序”。
    • 如果您位于“执行”中,请返回到“结果”并选择“重新排序” 。这将打开“重新排序”测试用例视图,您可以在其中安排测试用例的执行顺序。
  4. 拖放测试用例以在测试集或测试执行中对其重新排序。
  5. 完成对测试用例的重新排序后,选择“保存” 。

执行测试集时,测试用例将按您先前保存的顺序运行。

仅重新运行失败的测试用例​

没有用于仅重新运行排序测试集中失败的测试用例的批量选项。要在执行后重新运行单个失败的测试用例,请执行以下操作:

  1. 关闭该测试集的“强制执行执行顺序” 。
  2. 从“结果”选项卡重新执行特定测试用例。

有关更多信息,请参阅重新执行测试用例执行。

备注:

Enforcing an execution order and re-running individual test cases are mutually exclusive. A partial re-run produces results that appear to have run in order when they did not. This behavior is by design.

When Enforce Execution Order is turned off, you cannot control the execution order of the re-run test cases, unless you run the test cases one by one. As an alternative, trigger individual test case executions through the API.

To reduce the impact of this limitation, design independent test cases. When test cases depend on intermediate outputs, store and read those outputs through a common data source. Use one of the following:

  • A data table
  • A file
  • A queue

结果​

执行测试集时,执行顺序会保存,测试用例会按指定序列运行。

  • 步骤​
  • 仅重新运行失败的测试用例​
  • 结果​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新