UiPath Documentation
uipath-cli
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UiPath CLI 用户指南

上次更新日期 2026年5月20日

uip tm testsets

uip tm testsets管理测试集:Test Manager 中的可执行单元。测试集是一组有序的测试用例,您可以使用一个命令运行这些用例,并作为单次执行进行跟踪。每个testsets run调用都会返回一个ExecutionId ,其他uip tm动词( waitexecutionsreportresultattachment )将其用作输入。

大纲

uip tm testsets create --project-key <key> --name <name> [--description <text>]
uip tm testsets list --project-key <key> [--folder-key <uuid>] [--filter <text>]
uip tm testsets update --test-set-key <key> [--name <name>] [--description <text>]
uip tm testsets delete --test-set-key <key>
uip tm testsets list-testcases --test-set-key <key>
uip tm testsets run --test-set-key <key> [--execution-type <type>] [--input-path <file>]
uip tm testsets create --project-key <key> --name <name> [--description <text>]
uip tm testsets list --project-key <key> [--folder-key <uuid>] [--filter <text>]
uip tm testsets update --test-set-key <key> [--name <name>] [--description <text>]
uip tm testsets delete --test-set-key <key>
uip tm testsets list-testcases --test-set-key <key>
uip tm testsets run --test-set-key <key> [--execution-type <type>] [--input-path <file>]

所有动词都遵循全局选项和标准退出代码。每个动词接受-t, --tenant <name>--log-level <level> (默认为Information )。

采用--test-set-key的测试集动词从密钥的前缀中派生所属项目(例如DEMO:10 → 项目DEMO ),因此仅create--project-key需要list

uip tm testsets create

Create an empty test set in a project. Use testcases add afterwards to populate it.

参数:无。

选项

  • --project-key <key> (必填) — 拥有项目。
  • --name <name> (必填) — 测试集名称。
  • --description <text> — 自由格式说明。默认为空。

示例

uip tm testsets create \
  --project-key DEMO \
  --name "Smoke Suite" \
  --description "Core smoke tests"
uip tm testsets create \
  --project-key DEMO \
  --name "Smoke Suite" \
  --description "Core smoke tests"

数据形状

{
  "Code": "TestSetCreate",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Name": "Smoke Suite",
    "Description": "Core smoke tests"
  }
}
{
  "Code": "TestSetCreate",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Name": "Smoke Suite",
    "Description": "Core smoke tests"
  }
}

uip tm testsets list

列出项目中的测试集。CLI 会自动对结果进行分页。

参数:无。

选项

  • --project-key <key> (必填) — 要列出的项目。
  • --folder-key <uuid> — 限制为绑定到此 Orchestrator 文件夹的测试集。提取后在客户端应用。
  • --filter <text> — 对名称的服务器端搜索。

示例

uip tm testsets list --project-key DEMO --filter smoke
uip tm testsets list --project-key DEMO --filter smoke

数据形状

{
  "Code": "TestSetsList",
  "Data": [
    {
      "TestSetKey": "DEMO:10",
      "Name": "Smoke Suite",
      "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "Id": "a1b2c3d4-0000-0000-0000-000000000010"
    }
  ]
}
{
  "Code": "TestSetsList",
  "Data": [
    {
      "TestSetKey": "DEMO:10",
      "Name": "Smoke Suite",
      "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "Id": "a1b2c3d4-0000-0000-0000-000000000010"
    }
  ]
}

Id是内部 UUID — 需要,例如execution list --test-set-id

uip tm testsets update

重命名测试集或更改其描述。必须至少提供--name--description其中一个。

参数:无。

选项

  • --test-set-key <key> (必填) — 测试集密钥(例如DEMO:10 )。
  • --name <name> — 新名称。
  • --description <text> — 新说明。

示例

uip tm testsets update \
  --test-set-key DEMO:10 \
  --name "Smoke Suite (2026)"
uip tm testsets update \
  --test-set-key DEMO:10 \
  --name "Smoke Suite (2026)"

数据形状

{
  "Code": "TestSetUpdate",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Name": "Smoke Suite (2026)",
    "Description": "Core smoke tests",
    "Result": "Updated"
  }
}
{
  "Code": "TestSetUpdate",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Name": "Smoke Suite (2026)",
    "Description": "Core smoke tests",
    "Result": "Updated"
  }
}

uip tm testsets delete

通过密钥删除测试集。

参数:无。

选项

  • --test-set-key <key> (必填) — 测试集密钥。

示例

uip tm testsets delete --test-set-key DEMO:10
uip tm testsets delete --test-set-key DEMO:10

数据形状

{
  "Code": "TestSetDelete",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Id": "a1b2c3d4-0000-0000-0000-000000000010",
    "Result": "Deleted"
  }
}
{
  "Code": "TestSetDelete",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Id": "a1b2c3d4-0000-0000-0000-000000000010",
    "Result": "Deleted"
  }
}

uip tm testsets list-testcases

列出分配给测试集的测试用例。

参数:无。

选项

  • --test-set-key <key> (必填) — 要检查的测试集。

示例

uip tm testsets list-testcases --test-set-key DEMO:10
uip tm testsets list-testcases --test-set-key DEMO:10

数据形状

{
  "Code": "TestSetTestCasesList",
  "Data": [
    {
      "TestCaseKey": "DEMO:1",
      "Name": "Login smoke",
      "Version": "1.0.0",
      "Description": "Logs in and out"
    }
  ]
}
{
  "Code": "TestSetTestCasesList",
  "Data": [
    {
      "TestCaseKey": "DEMO:1",
      "Name": "Login smoke",
      "Version": "1.0.0",
      "Description": "Logs in and out"
    }
  ]
}

uip tm testsets run

Run a test set and return its ExecutionId immediately. The test set itself must already be configured with a package and folder — either by authoring inside Test Manager's web UI, or by hand via the REST API. Run does not block; pair it with uip tm wait in scripts.

参数:无。

选项

  • --test-set-key <key> (必填) — 要运行的测试集。项目键从前缀派生。
  • --execution-type <type> — 要运行的测试用例。以下之一:
    • automated (默认) — 仅适用于自动化测试用例。
    • manual — 仅适用于手动测试用例。
    • mixed — 包括自动和手动。
    • none — 无类型筛选器。
  • --input-path <file> — 参数覆盖的 JSON 文件的路径。文件必须包含形状类似于[{"name":"Param","type":"String","value":"v"}]数组。覆盖通过name (如果存在,则使用type )与测试集的当前参数定义进行匹配,不区分大小写。如果服务器未报告任何参数定义,则按原样发送输入。

示例:

# simplest
uip tm testsets run --test-set-key DEMO:10

# with parameter overrides and manual execution
uip tm testsets run \
  --test-set-key DEMO:10 \
  --execution-type mixed \
  --input-path ./params.json
# simplest
uip tm testsets run --test-set-key DEMO:10

# with parameter overrides and manual execution
uip tm testsets run \
  --test-set-key DEMO:10 \
  --execution-type mixed \
  --input-path ./params.json

数据形状

{
  "Code": "TestSetRun",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "TestSetKey": "DEMO:10",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z"
  }
}
{
  "Code": "TestSetRun",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "TestSetKey": "DEMO:10",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z"
  }
}
备注:

The returned Status reflects the state at launch (typically Running); it does not mean the run has succeeded. To get the run outcome, block on uip tm wait and then read uip tm report get. Exit-code behavior for the combined launch-and-wait flow is documented on uip tm executions. See the Related section below for the wait and report references.

  • testcases — create and link the test cases that populate a test set.
  • executions — list and retry executions once a test set has been run.
  • wait — 阻止,直到返回的ExecutionId达到最终状态。
  • 报告结果附件— 运行后工件。

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新