UiPath Documentation
autopilot
latest
false
Autopilot 用户指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

为需求生成测试

使用 Autopilot,根据 Test Manager 中的需求生成手动测试用例,并提供有关上下文锚定、提示说明以及查看或重新生成结果的指导。

备注:

功能可用性取决于您使用的云平台。有关详细信息,请参阅Test Manager 功能可用性页面

使用 Autopilot 直接根据需求生成手动测试用例。Autopilot 会分析需求的名称、说明、附件、自定义字段、标签和文档,以创建您可以审核、优化并添加到项目中的测试用例列表。有关编写生成准确测试的需求的指导,请参阅“最佳实践和限制”

先决条件

  • 您的 Test Manager 角色必须具有以下权限:
    • 测试用例 - 创建
    • 要求 - 编辑
  • (仅限 Cloud Business)要在生成测试时使用检索增强生成 (RAG),请先设置上下文锚定。有关详细信息,请参阅上下文锚定最佳实践

为需求生成测试

  1. 打开项目并转到需求

  2. 打开需求以为其生成测试,或创建包含详细说明的测试。

  3. Select Assign test case, and then select Generate test cases.

    备注:

    Alternatively, select Optimize coverage, and then select Generate tests.

  4. “提供其他上下文”窗口的“添加文档”部分,选择用于生成的需求附件,或上传其他文件。

  5. (Cloud Commercial only) In the Leverage RAG section, select an index that stores data uploaded to Context Grounding. Autopilot uses the indexed content as extra context when a requirement document is incomplete or references details stored elsewhere. RAG retrieves only relevant chunks from the index; only documents you attach directly are sent to Autopilot in full.

    1. “选择文件夹”下拉列表中,选择包含索引的文件夹。
    2. “选择索引”下拉列表中,选择要引用的索引。
    3. 结果数中,输入要根据引用信息生成的测试数量。
    提示:

    For best practices on working with Context Grounding, refer to Context Grounding best practices. For real-time, whole-document reasoning (DeepRAG) instead of chunk-level retrieval, build a custom agent in Agent Builder and connect it to Test Manager through Autopilot chat (agent) instead of this built-in agent.

  6. 选择“下一步” ,然后使用“提供其他指导”窗口,或从提示词库中选择提示词,指示 Autopilot:

    • 涵盖需求中描述的所有用户步骤和验收标准。
    • 生成先决条件。
    • 为每个测试步骤生成预期结果。
    • 忽略与需求关联的现有测试。默认情况下,Autopilot 会考虑关联的测试,以避免重复。

    Autopilot 一次最多可以生成 50 个测试用例(默认情况下 10 个),每个用例最多包含 50 个步骤。有关选择有效计数和构建测试步骤的指导,请参阅“最佳实践和限制”

  7. 选择“生成测试”以启动该流程。生成完成后,您将在应用程序内或通过电子邮件收到“测试用例生成完成”通知,具体取决于您的通知首选项

  8. 选择通知以查看生成的测试用例。

    1. 展开“生成测试”面板中的每个测试用例并查看其内容。
    2. If you are satisfied, select Create tests. Created test cases display a checkmark and are linked to the source requirement.
  9. If you are not satisfied with the results, select Regenerate and refine the input:

    1. 附加更多相关文档,以供 Autopilot 使用。
    2. 选择“下一步” ,然后在“提供说明”框中输入其他详细信息。
    3. 选择“重新生成”
    4. 选择 Test generation completed(测试生成已完成)通知以访问重新生成的测试用例。
    5. 展开并查看每个测试用例,然后为要保留的用例选择“创建测试”

支持的文件类型

您可以向 Autopilot 提供以下文件类型作为支持文档:

  • 仅处理文本内容 - TXT、BPMN、CSV
  • 可处理文本和图像内容 – DOCX、XLSX、PNG、JPG、PDF

结果

Autopilot 在项目的“测试用例”部分中创建生成的测试用例,并将其链接到用于生成它们的源需求。“测试用例生成完成”通知会确认创建。

  • 先决条件
  • 为需求生成测试
  • 支持的文件类型
  • 结果

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新