- 入门指南
- 项目管理
- 项目操作和实用程序
- Test Manager 设置
- ALM 工具集成
- API 集成
- 故障排除
Test Manager 用户指南
Feature availability depends on the cloud platform you use. For details, refer to the Test Manager feature availability page.
正在为需求生成手动测试用例
Feature availability depends on the cloud platform you use. For details, refer to the Test Manager feature availability page.
借助“生成测试”功能,您可以使用生成式 AI(人工智能)直接根据需求创建手动测试用例。帮助您生成测试用例的工具称为 Autopilot TM 。在 Autopilot TM的帮助下,此功能通过分析名称、说明、附件、自定义字段、标签和文档等各种需求详细信息,创建手动测试用例的列表。然后,您可以从初始列表中创建测试用例,或提供特定说明,以生成根据您的确切需求量身定制的测试用例。
先决条件
- 要为需求生成测试,您的 Test Manager 角色必须具有以下权限:
- 测试用例 - 创建
- 要求 - 编辑
- (For Cloud Commercial only) If you want to leverage RAG when generating tests, you need to start using Context Grounding, which RAG is a component of. To get started with Context Grounding, visit the dedicated Best practices page.
我们以测试在 UiBank 应用程序中提交贷款请求的功能为例。以下是该工具的具体用法:
步骤
- 打开项目,然后导航至需求。
- 创建一个名为“提交贷款请求”的需求,然后输入相关的详细说明,并突出显示应用程序流程和接受条件。检查可用于此示例的说明:
需求示例
此需求详细介绍了人们如何在 UiPath™ 提供支持的 UiBank 银行应用程序中申请贷款。应用程序流程
- 申请人在
https://uibank.uipath.com开始贷款申请。 - 申请人单击页眉菜单中的“产品”按钮。
- 申请人在下拉菜单中单击“贷款”按钮。
- 系统重定向到
https://uibank.uipath.com/loans。 - 申请人单击“申请贷款”按钮。
- 系统重定向到
https://uibank.uipath.com/loans/apply。 - 申请人必须填写以下必填字段:
- 电子邮件地址:必须在此字段中提供有效格式的电子邮件地址。
- 贷款金额:该字段仅接受正整数值。
- 贷款期限:该字段选项为 1、3、5 和 10(以年为单位)。
- 年收入:该字段仅接受正整数值。
- 年龄:该字段仅接受正整数值。
- 然后,申请人单击“提交贷款申请”按钮。
- 在下一页上,申请人将收到贷款申请获得批准或拒绝的通知。验收标准对于年龄在 18 至 65 岁之间且贷款金额少于 10 万的申请人,我们会通过以下内容批准贷款申请:
- 恭喜!您的 UiBank 贷款已批准!对于未满 18 周岁的申请人,我们将通过以下方式拒绝贷款申请:
- “抱歉,目前您的贷款未获批准”对于年龄在 18 至 65 岁之间且贷款金额超过 10 万的申请人,我们会通过以下方式拒绝贷款申请:
- “抱歉,您的贷款目前未获得批准”对于未提供所有必填字段但单击“提交贷款申请”按钮的申请人:
- 系统将不会显示任何错误消息
- 不执行任何操作
- 申请人将停留在同一页面
- 为此需求选择“更多选项” ,然后选择“优化覆盖率” 。或者,打开需求,然后选择“优化覆盖率” 。
- 在“优化覆盖率”对话框中,选择“生成测试” 。系统将打开“提供其他上下文”窗口,重点关注“添加文档” ,提示您输入生成测试用例所需的附件或其他文档。附件应与提交贷款请求的流程绑定。
- 在“添加文档”部分中,选择需求的附件。这些附件在生成测试时使用。您也可以自行上传其他文件。
Figure 1. The Add documents section for generating tests (for Cloud Commercial only)
2. (For Cloud Commercial only) In the Leverage RAG section of the Provide additional context window, select an index which stores your data uploaded to Context Grounding. The selected index helps Autopilot in generating more accurate tests by giving it context about the applications that you are trying to automate. For example, you can leverage RAG when a requirement document has incomplete information or refers to additional details in other sections. In this case, you can leverage RAG to draw those details from indexed references. :::note For best practices on working with Context Grounding, visit Best practices. ::: 1. From the Select folder dropdown list, select the folder where you store the indexes storing the desired information you want to share with Autopilot. 2. From the Select index dropdown list, select the specific index that you want Autopilot to reference. 3. For Number of results, enter the number of tests you want Autopilot to generate based on the referenced information.
Figure 2. The Leverage RAG section for generating tests
5. Select Next and provide additional instructions that AutopilotTM should use when generating test cases. Choose from a prompt from the Prompt library or type these instructions in the Provide additional guidance window. These are some of the instructions that Autopilot can follow:
- 您可以指示 Autopilot TM要生成的测试用例的数量。测试用例的最大数量为 50。
- 您可以指定 Autopilot TM ,以涵盖贷款请求需求中描述的所有用户步骤和验收标准。
- 您可以指示 Autopilot TM生成先决条件。
- 您可以指定 Autopilot TM为每个测试步骤生成预期结果。
- By default, Autopilot considers existing tests linked to a requirement to prevent duplicating tests. However, you can instruct Autopilot to disregard existing tests during new test generation. You can do this by providing an instruction like: "Do not consider tests that are linked to this requirement when generating tests".Figure 3. The Provide additional guidance window for generating tests

- (可选)从“模型”下拉列表中,选择 Autopilot 应使用的 AI 模型。生成测试时,Autopilot 默认使用 Claude 3.7 Sonnet,这也是推荐的模型。
备注:
“模型”下拉列表中可用的模型取决于应用于组织和租户的AI Trust Layer 策略。如果启用了所有受支持的模型,则系统会推荐使用 Claude 3.7 Sonnet 选项。如果仅启用了一种模型类型(例如 Azure OpenAI),则系统仅显示和自动推荐 GPT 4o 模型。
- 选择“生成测试”以启动该流程。生成完成后,您将收到“测试用例生成完成”通知。根据您的通知首选项,您可以通过应用程序内通知和电子邮件接收通知。
- 选择“测试生成已完成”通知以查看生成的测试用例。
- 展开“生成测试”面板中的每个测试用例,并查看生成的测试用例。
Figure 4. The preview of generated tests
2. If you are satisfied with their content, select Create tests. The selected test cases will display a checkmark in the Generate tests panel, indicating they were successfully created. The generated test cases are also linked with the requirement that was used to generate them. 8. If you are not satisfied with the generated test cases, select Regenerate, and provide additional details about your use case.
- 附加更多相关文档,以供 Autopilot TM使用。
- 单击“下一步” ,然后在“提供说明”文本框中输入其他详细信息。本页末尾有关编写说明的“最佳实践”部分提供了有关创建有效提示词的指南。
- 优化步骤后,选择“重新生成”。
- 单击“测试生成已完成”通知以访问重新生成的测试用例。
- 展开每个测试用例并进行审核。
- 选择您满意的测试用例,然后选择“创建测试” 。
支持的文件类型
Autopilot 可以处理各种文件类型。 根据文件类型,Autopilot 可以处理其中的某些内容。 以下列表列出了您可以向 Autopilot 提供的文件类型,以及 Autopilot 可以处理的内容类型的详细信息:
- 仅处理文本内容 – Autopilot 仅处理以下文件类型中的文本内容:
- TXT
- BPMN
- CSV
- 同时处理文本和图像内容 – Autopilot 可处理以下文件类型中的文本和图像:
- DOCX
- XLSX
- PNG
- JPG
最佳实践
请访问根据需求生成测试的最佳实践,查看完整的指南和示例列表,以帮助您编写有效的说明。
使用 Autopilot for Testers 管理用户访问权限
AI Trust Layer监管策略允许您在组织内管理 AI 驱动的功能的使用。尽管所有成员都默认具有对这些功能的访问权限,但您可以根据需要使用此策略来限制访问。AI Trust Layer监管策略使您能够在用户、组或租户级别限制用户对某些 AI 驱动的功能或全部功能的访问。此外,它还使您能够决定用户可以访问哪些 AI 产品。您可以在 Automation Ops 中创建、修改和实施此监管策略。
如果您想部署AI Trust Layer监管策略并仍使用 AI 驱动的测试功能,请确保在策略的“功能切换”中,将“启用 Test Manager 功能”选择为“是” 。
查看以下资源,了解如何为组织创建、配置和部署监管策略。
访问最新的测试生成结果
在“要求”页面中访问最新生成的测试用例。
- 前往“最新结果” 。
- 选择“生成的测试用例” 。