test-suite
latest
false
UiPath logo, featuring letters U and I in white
Test Suite 用户指南
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 2024年11月15日

Generate tests for requirements

This page lists guidelines and best practices to effectively generate test cases using AutopilotTM in Test Manager.

要求说明

本节概述了 Test Manager 中需求的关键特征。

需求通常涉及与质量方面相关联的特定功能,例如功能(软件应执行的操作)、性能(软件运行应以多快的速度运行)、可用性(使用的难易程度)和安全性(软件运行应的安全性)等。

1. 要求的目的

AI models, such as AutopilotTM, rely on specificity for correctly interpreting requirements. Broad or vague descriptions might lead to irrelevant, or incorrect test cases. To mitigate this, start with a concise, yet precise user-focused statement that outlines the requirement's purpose. Focus on enforcing the ultimate benefit to the user.

示例:对于人寿保险应用程序,您可以从以下内容开始:

“作为潜在保单持有者,我想计算保险费,以便了解潜在成本”。

这明确了用户的预期收益,并为测试该要求设定了明确的目标。

2. 应用程序逻辑

The efficiency of AutopilotTM in generating accurate and detailed test steps largely depends on its understanding of the user journey and application sequence. So, it's crucial to detail the specific interactions that the user will have with the application and the subsequent application responses (from the start of the application up to the final test action) is key. This helps AutopilotTM understand the chronological order of operations, leading to more accurate and detailed test steps.

示例:对于保险费计算功能,描述工作流如下:

“用户从主屏幕开始,通过主菜单导航到‘获取报价’屏幕。然后,他们在指定的表单字段中填写个人数据,包括年龄和性别。他们从可用选项中选择所需的保险范围和保单条款。当用户单击‘计算保险费’时,应用程序将计算保险费并在下一个屏幕上显示。”

3. 验收标准

Clear, measurable acceptance criteria are vital for setting application expectations and guiding AutopilotTM to verify specific outcomes. They should encompass both positive and negative scenarios, including situations where users may not follow prescribed usage, may input invalid data, or when the application may reach an error state. Criteria should also consider non-functional factors like security, usability, and scalability. Without well-defined acceptance criteria, AutopilotTM might generate inadequate test cases.

示例:对于我们的人寿保险应用程序的保费计算功能,请指定具体的验收标准,如以下示例之一所示:

  • “系统必须考虑用户的年龄来计算保费。每超过 25 周岁,就必须在 100 美元的基本保费上增加 5 美元”
  • “由于吸烟者的相关健康风险较高,系统必须为吸烟者增加 50 美元的保费”
  • “如果用户输入的年龄低于 18 周岁,则系统应显示一条错误消息”
  • “当并发用户数量小于或等于 1000 时,保险费计算过程不应超过 3 秒”

其他说明

This section provides guidelines so you can allow AutopilotTM to focus on aspects that should be considered when generating test cases.

Guide AutopilotTM by providing additional instructions in the Provide Additional Guidance screen. Use the out-of-the-box prompts from the Prompt Library, which help generate end-to-end test cases from flow diagrams, generate tests for valid end-to-end scenarios, generate tests to find elusive issues, generate end-to-end tests from flow diagrams, and generate tests to find elusive issues. You can also add your own custom prompts to the Prompt Library, especially those you frequently use for manual test case generation.

To generate a specific number of test cases, instruct AutopilotTM with commands like "Generate the top 20 test cases for this requirement." By default, AutopilotTM generates expected results only for the final test step in each test case. To generate expected results for each test step, use "Generate expected results for each test step". Additionally, AutopilotTM can generate preconditions and/or postconditions for manual test cases upon request. Specify what to include or exclude, as the preconditions and postconditions are not generated by default.

支持文档

This section lists supporting documents you can provide to AutopilotTM. These documents are additional information that complement the description of a requirement in Test Manager. These documents are intended to enhance the understanding of Autopilot about a requirement, enabling it to generate more accurate and useful test cases for a requirement.

流程图

要说明应用程序中的逐步操作,请考虑以图像或 BPMN 文件的形式添加用例图表、流程图或流程图。流程图可帮助 Autopilot 掌握对特定需求很重要的用户活动的顺序和逻辑流程。借助这些流程表示,Autopilot 可以生成更精确的测试用例,与应用程序的实际工作流紧密结合。

模型和线框

为了便于 Autopilot 理解,请考虑添加描述您的 UI/UX 要求的可视化图表。这在测试新的前端功能时特别有用,并且有助于弄清楚布局、用户交互和要测试的元素。

合规性文档

In regulated industries such as healthcare, finance, or telecommunications, consider including compliance and regulatory documents. These guidelines often apply universally across various requirements (for example: user stories or use cases) in Test Manager. By uploading these documents, you enable Autopilot to integrate compliance standards into the test cases it generates for each requirement, not just those directly linked to specific compliance criteria. This approach ensures that all test cases adhere to industry regulations and that compliance is consistently addressed across all requirements tested by Autopilot.

讨论副本

考虑添加特定要求的讨论副本。这可以是通过在线平台举行的会议或虚拟会话,参加者包括开发者、产品负责人和测试者。副本为 Autopilot 提供了有关团队成员如何解释或计划实施需求的见解,从而提供了可以显着提高生成的测试用例的精度的上下文。

功能限制

This section outlines the current limitations of AutopilotTM.

支持的文件类型

您只能上传以下文件扩展名,Autopilot 仅处理其中的文本内容:

  • DOCX
  • XLSX
  • TXT
  • CSV
  • PNG
  • JPG
  • PDF
  • BPMN
注意: Autopilot 仅处理文件中的文本内容,不会处理文件中的图像。

输入令牌容量

Autopilot 的最大输入 Token 容量为 128,000,相当于大约 96,000 个单词或 512,000 个字符。

确保您的要求描述和支持文档没有超出这些限制。

提示:根据我们的观察,100 个 Token 大致可转换为约 75 个单词或 400 个字符。

要检查文档的大致令牌计数,请以 TXT 文件形式打开文档,然后将内容复制到 Open AI Tokenizer 工具中。提供的令牌计数为近似值。实际令牌计数可以更多。

测试用例生成

Autopilot 当前最多只能一次生成 50 个测试用例。如果未指定要生成的测试用例数,则 Autopilot 会生成 10 个测试用例。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。