studio
2024.10
true
Studio 用户指南
Last updated 2024年9月26日

AI 生成的测试数据

You can generate test data that is highly specific for your testing needs, using the AI-powered capabilities offered by AutopilotTM. Initially, Autopilot lets you input specific instructions, after which it produces arguments and variables that are relevant to both the instruction and the associated test data set. Additionally, you can instruct Autopilot to generate new arguments for your test data set that are later added to your test case.

先决条件

为了让 Autopilot 生成测试数据,您的测试用例必须包含我们当前支持的参数类型。查看支持的参数类型部分,以获取可以包含在测试用例中的参数类型列表。

支持的参数类型

AI 生成的测试数据支持的参数类型包括:

  • 字符串
  • Int32, Int64
  • Double
  • 小数
  • 布尔值
  • 字符
  • 字节
  • SByte
  • UInt16UInt32UInt64
  • 单个

为测试用例生成测试数据

要使用 Autopilot 为低代码或编码测试用例生成测试数据,请执行以下操作:

  1. 打开测试资源管理器。
  2. Right-select the test case for which you want to generate test data, and select Add Test Data.
  3. 从“来源”下拉列表中,选择“使用 Autopilot 生成”。
  4. Enter instructions in the Write an additional prompt for better results during generation text field to generate a first round of test data.
  5. As an optional step, you can enhance the generated test data with additional prompt instructions.

    If instructed, Autopilot adds more arguments than the current ones. The additional arguments are then added to the test case. Additionally, you can instruct Autopilot to generate a certain number of data variations.

  6. 当您对生成的测试数据感到满意时,请选择“导入”以将数据添加到您的测试用例中。
图 1. 使用 Autopilot 生成测试数据时的对话框

最佳实践

访问生成综合测试数据,查看有关有效生成 AI 驱动的测试数据的建议。最佳实践包含关于以下内容的提示:

  • 如何为一组可靠的数据创建参数。
  • 有关首选数据组合方法的使用方式说明。
  • 如何使用提示词自定义数据集。

此页面有帮助吗?

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