Generate tests for requirements
This page lists guidelines and best practices to effectively generate test cases using AutopilotTM in Test Manager.
本节概述了 Test Manager 中需求的关键特征。
需求通常涉及与质量方面相关联的特定功能,例如功能(软件应执行的操作)、性能(软件运行应以多快的速度运行)、可用性(使用的难易程度)和安全性(软件运行应的安全性)等。
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.
示例:对于人寿保险应用程序,您可以从以下内容开始:
“作为潜在保单持有者,我想计算保险费,以便了解潜在成本”。
这明确了用户的预期收益,并为测试该要求设定了明确的目标。
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.
示例:对于保险费计算功能,描述工作流如下:
“用户从主屏幕开始,通过主菜单导航到‘获取报价’屏幕。然后,他们在指定的表单字段中填写个人数据,包括年龄和性别。他们从可用选项中选择所需的保险范围和保单条款。当用户单击‘计算保险费’时,应用程序将计算保险费并在下一个屏幕上显示。”
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 可以生成更精确的测试用例,与应用程序的实际工作流紧密结合。
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.
This section outlines the current limitations of AutopilotTM.
您只能上传以下文件扩展名,Autopilot 仅处理其中的文本内容:
- DOCX
- XLSX
- TXT
- CSV
- PNG
- JPG
- BPMN
Autopilot 的最大输入 Token 容量为 128,000,相当于大约 96,000 个单词或 512,000 个字符。
确保您的要求描述和支持文档没有超出这些限制。
要检查文档的大致令牌计数,请以 TXT 文件形式打开文档,然后将内容复制到 Open AI Tokenizer 工具中。提供的令牌计数为近似值。实际令牌计数可以更多。