- 入门指南
- 功能
- Data privacy and governance
- 产品可用性
- Earlier Autopilot capability sets
- Autopilot for Everyone
Autopilot capabilities for generating coded and low-code test cases from natural language, comments, or existing code.
Autopilot assists you in generating coded test cases, either from text and existing code, or from manual test cases created in Test Manager.
Generating coded test cases from text and existing code
In a new or existing coded automation, you can use Autopilot to generate code from natural language, from comments in your automation, or from existing lines of code. Use the Ctrl + Shift + G shortcut, or the Autopilot icon, to generate code.
Generating coded test cases from manual tests
将桌面版 Studio 连接到 Test Manager 后,导航到测试资源管理器并搜索您的手动测试。 在这里,您可以选择以下其中一种场景来为其生成编码测试用例:
-
使用创建编码测试用例创建一个编码测试用例,以注释的形式显示步骤。 。然后提示 Autopilot 根据注释生成代码。
-
使用使用 Autopilot 生成编码测试用例直接生成功能齐全的编码测试用例。
有关生成测试用例的更多信息,请参阅根据手动测试用例创建编码测试用例和使用 AI 生成编码测试用例。
Generate coded API test cases
If you want to create a coded test case that automates a scenario involving APIs, Autopilot can help with generating the code for this scenario. In the code editor, open the context menu and select Generate Code, then offer Autopilot the necessary instructions. For instance, you should offer Autopilot the API that you want to use, and the API key that it should access.
Generate low-code test cases
Autopilot 可帮助您从文本或在 Test Manager 中创建的手动测试生成低代码测试用例。
From manual tests
Connect Studio Desktop to Test Manager and locate your manual test in the Test Explorer. Then, open the context menu for the manual test and select Generate Test Case with Autopilot.
From text
打开空白的低代码测试用例,然后从“设计器”面板中选择“使用 Autopilot 生成” 。输入所需的测试步骤,然后选择“生成”以触发测试用例生成。
图 1.在“文字注释”字段中输入提示说明
有关更多信息,请参阅使用 AI 生成低代码测试用例。
最佳实践
有关在将文本或手动测试转换为代码时,编写有效提示以及使用对象存储库和命名约定的指导,请参阅: