UiPath Documentation
uipath-cli
latest
false
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

UiPath CLI ユーザー ガイド

uipTMテストケース

uip tm testcases Test Manager プロジェクト内のテスト ケースを管理します。Orchestrator のオートメーションの作成、一覧表示、更新、削除、リンクのリンクまたはリンク解除、結果の履歴の確認、テスト セットへのテスト ケースの追加または削除を行います。このページでは、実行によって生成された単一のテスト ケース ログに添付されたアサーション アーティファクトを読み取り uip tm testcaselogs list-assertionsについても説明します。

テスト ケースは作成者の単位です。testcases link-automationでパッケージエントリポイントにリンクされると実行可能になり、テストセットの一部として実行されます(テストセットを参照)。

概要

uip tm testcases create --project-key <key> --name <name> [--description <text>] [--version <version>]
uip tm testcases list --project-key <key> [--filter <text>]
uip tm testcases list-result-history --project-key <key> --test-case-id <uuid> [filters…]
uip tm testcases update --project-key <key> --test-case-key <key> [--name <name>] [--description <text>]
uip tm testcases delete --project-key <key> --test-case-key <key>
uip tm testcases link-automation --project-key <key> --test-case-key <key> --folder-key <uuid> --package-name <name> --test-name <name>
uip tm testcases unlink-automation --project-key <key> --test-case-key <key>
uip tm testcases list-automations --project-key <key> --folder-key <uuid> [--package-name <name>]
uip tm testcases list-testsets --project-key <key> --test-case-key <key>
uip tm testcases add --test-set-key <key> --test-case-keys <keys>
uip tm testcases remove --test-set-key <key> --test-case-keys <keys>

uip tm testcaselogs list-assertions --project-key <key> --test-case-log-id <uuid>
uip tm testcases create --project-key <key> --name <name> [--description <text>] [--version <version>]
uip tm testcases list --project-key <key> [--filter <text>]
uip tm testcases list-result-history --project-key <key> --test-case-id <uuid> [filters…]
uip tm testcases update --project-key <key> --test-case-key <key> [--name <name>] [--description <text>]
uip tm testcases delete --project-key <key> --test-case-key <key>
uip tm testcases link-automation --project-key <key> --test-case-key <key> --folder-key <uuid> --package-name <name> --test-name <name>
uip tm testcases unlink-automation --project-key <key> --test-case-key <key>
uip tm testcases list-automations --project-key <key> --folder-key <uuid> [--package-name <name>]
uip tm testcases list-testsets --project-key <key> --test-case-key <key>
uip tm testcases add --test-set-key <key> --test-case-keys <keys>
uip tm testcases remove --test-set-key <key> --test-case-keys <keys>

uip tm testcaselogs list-assertions --project-key <key> --test-case-log-id <uuid>

すべての動詞は、 グローバルオプション と標準 終了コードを尊重します。すべての動詞は -t, --tenant <name>--log-level <level> を受け入れます(デフォルト Information)。

uip tm テストケースの作成

プロジェクト内に新しいテスト ケースを作成します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --name <name> (必須) — テスト ケース名。
  • --description <text> — 自由形式の説明。既定値は空です。
  • --version <version> — テスト ケースのバージョン文字列。既定値は [ 1.0.0です。

uip tm testcases create \
  --project-key DEMO \
  --name "Login smoke" \
  --description "Logs in and out"
uip tm testcases create \
  --project-key DEMO \
  --name "Login smoke" \
  --description "Logs in and out"

データシェイプ

{
  "Code": "TestCaseCreate",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Login smoke",
    "Description": "Logs in and out",
    "Version": "1.0.0"
  }
}
{
  "Code": "TestCaseCreate",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Login smoke",
    "Description": "Logs in and out",
    "Version": "1.0.0"
  }
}

TestCaseKey (パブリック PROJECT:N 識別子) は、他の動詞に渡すものです。内部 Id は、 list-result-historyにのみ必要です。

uip tm のテスト ケースのリスト

プロジェクト内のすべてのテスト ケースのリストを取得します。CLI は結果を自動的にページングします。この動詞ではページング オプションは公開されません。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — リストするプロジェクト。
  • --filter <text> — 名前またはキーでフィルタリングします (サーバー側検索)。

uip tm testcases list --project-key DEMO --filter login
uip tm testcases list --project-key DEMO --filter login

データシェイプ

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

uip tm テストケース list-result-history

1 つのテスト ケースのテスト ケース ログの履歴を表示します。PROJECT:Nキーではなく、内部--test-case-id (UUID) を取得します — testcases list または以前の TestCaseCreate 出力から UUID を検索します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-id <uuid> (必須) — 内部テスト ケースの UUID
  • --filter <text> — テスト ケース ログを名前で検索します。
  • --only-failed — 「show only failed logs」のショートカット(デフォルトは falseです)。
  • --results <results...> — 含めるスペース区切りの結果。指定できる値は、SDK Result 列挙型です。
  • --statuses <statuses...> — スペースで区切られた実行ステータスです。指定できる値は、SDK TestCaseLogExecutionStatus 列挙型です。
  • --duration-period <period> — 期間バケットでフィルター処理します。指定できる値は、SDK DurationPeriod 列挙型です。
  • --top <number> — ページ サイズ。既定値は [ 50です。
  • --skip <number> — スキップする結果。既定値は [ 0です。
注:

--results--statuses--duration-period に正確に受け入れられる値は、インストールされたツール バージョンに同梱されている Test Manager SDK の列挙型から実行時に生成されます。uip tm testcases list-result-history --helpを実行して、現在のセットを確認します。

uip tm testcases list-result-history \
  --project-key DEMO \
  --test-case-id a1b2c3d4-0000-0000-0000-000000000001 \
  --only-failed
uip tm testcases list-result-history \
  --project-key DEMO \
  --test-case-id a1b2c3d4-0000-0000-0000-000000000001 \
  --only-failed

データシェイプ

{
  "Code": "TestCaseResultHistory",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000001",
      "Result": "Failed",
      "Status": "Finished",
      "ExecutionEnd": "2025-04-15T12:00:00Z"
    }
  ]
}
{
  "Code": "TestCaseResultHistory",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000001",
      "Result": "Failed",
      "Status": "Finished",
      "ExecutionEnd": "2025-04-15T12:00:00Z"
    }
  ]
}

uip tm テストケースの更新

テスト ケースの名前を変更するか、テスト ケースの説明を変更します。--nameまたは--descriptionのうち少なくとも1つが必要です。そうしないと、コマンドは検証エラーで失敗します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-key <key> (必須) — テスト ケースのキー (例:DEMO:1)。
  • --name <name> — 新しい名前。
  • --description <text> — 新しい説明。

uip tm testcases update \
  --project-key DEMO \
  --test-case-key DEMO:1 \
  --name "Login smoke (2026)"
uip tm testcases update \
  --project-key DEMO \
  --test-case-key DEMO:1 \
  --name "Login smoke (2026)"

データシェイプ

{
  "Code": "TestCaseUpdate",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Name": "Login smoke (2026)",
    "Description": "Logs in and out",
    "Result": "Updated"
  }
}
{
  "Code": "TestCaseUpdate",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Name": "Login smoke (2026)",
    "Description": "Logs in and out",
    "Result": "Updated"
  }
}

uip tm テスト ケース delete

テスト ケースをキーで削除します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-key <key> (必須) — テスト ケースのキー (例:DEMO:1)。

uip tm testcases delete --project-key DEMO --test-case-key DEMO:1
uip tm testcases delete --project-key DEMO --test-case-key DEMO:1

データシェイプ

{
  "Code": "TestCaseDelete",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Result": "Deleted"
  }
}
{
  "Code": "TestCaseDelete",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Result": "Deleted"
  }
}

Orchestrator パッケージのエントリ ポイントをテスト ケースにバインドします。これにより、テスト ケースがテスト セット内で実行可能になります。

内部的には、このコマンドは --folder-keyからフォルダーの表示名を解決し、一致するパッケージ エントリ ポイントを名前で検索してから、バインドをテスト ケースに格納します。--folder-key--package-name--test-nameの 4 つすべてが具体的なエントリ ポイントに解決されない場合、コマンドは失敗します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-key <key> (必須) — バインドするテスト ケース。
  • --folder-key <uuid> (必須) — Orchestrator フォルダーの UUID ( uip or folders listから)。
  • --package-name <name> (必須) — Orchestrator のパッケージ識別子 (例:InvoiceTests)。
  • --test-name <name> (必須) — パッケージ内のテスト ケース名 (エントリ ポイント名) です。

uip tm testcases link-automation \
  --project-key DEMO \
  --test-case-key DEMO:1 \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
  --package-name InvoiceTests \
  --test-name SmokeTest
uip tm testcases link-automation \
  --project-key DEMO \
  --test-case-key DEMO:1 \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
  --package-name InvoiceTests \
  --test-name SmokeTest

データシェイプ

{
  "Code": "TestCaseLinkAutomation",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "PackageName": "InvoiceTests",
    "PackageSource": "Shared",
    "TestName": "SmokeTest",
    "Result": "Linked"
  }
}
{
  "Code": "TestCaseLinkAutomation",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "PackageName": "InvoiceTests",
    "PackageSource": "Shared",
    "TestName": "SmokeTest",
    "Result": "Linked"
  }
}

PackageSource は、 --folder-keyから解決されるフォルダーの表示名です。

テスト ケースから package-entry-point バインドを削除します。リンクを解除すると、テスト ケースは再度リンクされるまで実行できなくなります。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-key <key> (必須) — リンクを解除するテスト ケース。

uip tm testcases unlink-automation --project-key DEMO --test-case-key DEMO:1
uip tm testcases unlink-automation --project-key DEMO --test-case-key DEMO:1

データシェイプ

{
  "Code": "TestCaseUnlinkAutomation",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Result": "Unlinked"
  }
}
{
  "Code": "TestCaseUnlinkAutomation",
  "Data": {
    "TestCaseKey": "DEMO:1",
    "Result": "Unlinked"
  }
}

uip tm testcases list-automations

Orchestrator フォルダーで利用可能なテスト エントリ ポイントのリストを表示します。このパラメーターを使用して、link-automationに渡す--package-name/--test-name値を見つけます。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — 所有プロジェクト (ルックアップのスコープに使用)。
  • --folder-key <uuid> (必須) — Orchestrator フォルダー UUID。
  • --package-name <name> — リストを 1 つのパッケージに絞り込みます (大文字と小文字を区別しない完全一致)。

uip tm testcases list-automations \
  --project-key DEMO \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001
uip tm testcases list-automations \
  --project-key DEMO \
  --folder-key f0f0f0f0-0000-0000-0000-000000000001

データシェイプ

{
  "Code": "TestAutomationsList",
  "Data": [
    {
      "PackageName": "InvoiceTests",
      "TestName": "SmokeTest",
      "PackageVersion": "1.0.2"
    }
  ]
}
{
  "Code": "TestAutomationsList",
  "Data": [
    {
      "PackageName": "InvoiceTests",
      "TestName": "SmokeTest",
      "PackageVersion": "1.0.2"
    }
  ]
}

uip tm testcases list-testsets

特定のテスト ケースを含むすべてのテスト セットのリストを取得します。

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-case-key <key> (必須) — テスト ケースのキー (例:DEMO:1)。

uip tm testcases list-testsets --project-key DEMO --test-case-key DEMO:1
uip tm testcases list-testsets --project-key DEMO --test-case-key DEMO:1

データシェイプ

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

uip tm テストケースに追加

1 つ以上のテスト ケースをテスト セットに追加します。CLI は、すべてのキーを内部 UUID に解決し、1 回の要求で割り当てエンドポイントを呼び出します。不明なキーがある場合、変更が行われる前に呼び出し全体が失敗します。

引数

設定はありません。

オプション

  • --test-set-key <key> (必須) — 変更するテスト セット。
  • --test-case-keys <keys> (必須) — コンマ区切りのテスト ケース キー (例:DEMO:1,DEMO:2)。コンマを囲む空白は無視されます。

uip tm testcases add \
  --test-set-key DEMO:10 \
  --test-case-keys DEMO:1,DEMO:2
uip tm testcases add \
  --test-set-key DEMO:10 \
  --test-case-keys DEMO:1,DEMO:2

データシェイプ

{
  "Code": "TestCaseAdd",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Added": "DEMO:1, DEMO:2",
    "Result": "Added"
  }
}
{
  "Code": "TestCaseAdd",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Added": "DEMO:1, DEMO:2",
    "Result": "Added"
  }
}

uip tm のテストケースの削除

テスト セットから 1 つ以上のテスト ケースを削除します。testcases add と同じセマンティクスですが、未割り当てエンドポイントを呼び出します。

引数

設定はありません。

オプション

  • --test-set-key <key> (必須) — 変更するテスト セット。
  • --test-case-keys <keys> (必須) — 削除するテスト ケースのコンマ区切りのキーです。

uip tm testcases remove \
  --test-set-key DEMO:10 \
  --test-case-keys DEMO:1,DEMO:2
uip tm testcases remove \
  --test-set-key DEMO:10 \
  --test-case-keys DEMO:1,DEMO:2

データシェイプ

{
  "Code": "TestCaseRemove",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Removed": "DEMO:1, DEMO:2",
    "Result": "Removed"
  }
}
{
  "Code": "TestCaseRemove",
  "Data": {
    "TestSetKey": "DEMO:10",
    "Removed": "DEMO:1, DEMO:2",
    "Result": "Removed"
  }
}

uip tm testcaselogs list-assertions

単一のテスト ケース ログに対して記録されたアサーションのリストを取得します。テスト ケースを実行するたびに、テスト ケース ログが 1 つだけ生成されます。そのアサーションは、オートメーションで記録された個々のチェック (ExpectVerifyExpressionなど) です。テスト ケース ログがFailedとマークされている理由を明らかにする場合に使用します。

この動詞は 、 testcasesではなく testcaselogsで登録されますが、テスト ケースのログのアサーション アーティファクトを読み取るため、こちらで説明しています。

引数

設定はありません。

オプション

  • --test-case-log-id <uuid> (必須) — テスト ケース ログ UUID。uip tm executions testcaselogs list または uip tm testcases list-result-historyから取得します。
  • --project-key <key> (必須) — プロジェクトを所有しています。

uip tm testcaselogs list-assertions \
  --test-case-log-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO
uip tm testcaselogs list-assertions \
  --test-case-log-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO

データシェイプ

{
  "Code": "TestCaseLogAssertions",
  "Data": [
    { "Message": "Title contains 'Welcome'", "Succeeded": true },
    { "Message": "Button 'Login' visible", "Succeeded": false }
  ]
}
{
  "Code": "TestCaseLogAssertions",
  "Data": [
    { "Message": "Title contains 'Welcome'", "Succeeded": true },
    { "Message": "Button 'Login' visible", "Succeeded": false }
  ]
}
  • プロジェクト — すべてのテスト ケースを所有するスコープです。
  • テストセット — テスト ケースを実行可能なスイートにグループ化します。
  • 実行 — テスト ケース ログ (execution testcaselogs list) の実行レベルのビュー
  • レポート — 実行の概要。失敗したケースとアサーション テキストが含まれます。

参照

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得