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

UIP TM の実行

「uip tm executions」の構文とオプション テスト実行のリスト、フィルター処理、リトライ、および完了した実行のテスト ケース ログの調査を行います。

uip tm executions は、テスト実行 ( uip tm testsets runによって生成されたオブジェクト) を検査および操作します。これらの動詞は、テスト セットの実行のリストを取得したり、完了した実行のテスト ケース ログを列挙したり、既存の実行を ID で再実行したり、失敗したケースのみをその場でリトライしたりします。

実行 を開始する コマンドは uip tm testsets runです。このコマンドは ExecutionIdを返します。このページのすべての動詞は、その ID を受け取ります (またはコンテキストから派生します)。

概要

uip tm executions list --project-key <key> [--test-set-id <uuid>] [--filter <text>] [--limit <n>] [--offset <n>]
uip tm executions list-filtered --project-key <key> [--status <status>] [--execution-type <type>] [--execution-finished-interval <interval>] [--updated-by <userId>] [--search <text>] [--labels <labels...>] [--test-execution-ids <ids...>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm executions testcaselogs list --execution-id <uuid> --project-key <key> [--only-failed] [--filter <text>] [--limit <n>] [--offset <n>]
uip tm executions run --project-key <key> --execution-id <uuid> --execution-type <type> [--test-case-log-ids <ids...>] [--async]
uip tm executions retry --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--execution-type <type>]
uip tm executions get-stats --execution-id <uuid> --project-key <key>
uip tm executions list --project-key <key> [--test-set-id <uuid>] [--filter <text>] [--limit <n>] [--offset <n>]
uip tm executions list-filtered --project-key <key> [--status <status>] [--execution-type <type>] [--execution-finished-interval <interval>] [--updated-by <userId>] [--search <text>] [--labels <labels...>] [--test-execution-ids <ids...>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm executions testcaselogs list --execution-id <uuid> --project-key <key> [--only-failed] [--filter <text>] [--limit <n>] [--offset <n>]
uip tm executions run --project-key <key> --execution-id <uuid> --execution-type <type> [--test-case-log-ids <ids...>] [--async]
uip tm executions retry --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--execution-type <type>]
uip tm executions get-stats --execution-id <uuid> --project-key <key>

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

uip tm 実行のリスト

テスト セットに関連付けられた実行のリストを表示します。--test-set-id は任意です。プロジェクト内のすべてのテスト セットの実行のリストを取得するには省略します。

引数

設定はありません。

オプション

フラグ説明
--project-key <key>必須。所有するプロジェクト。
--test-set-id <uuid>テスト セットの UUID (TestSetKeyではなく testsets listId フィールド)。
--filter <text>実行を名前で検索する。
--limit <n>ページ サイズ。既定値は 50です。
--offset <n>スキップする結果。既定値は 0です。

uip tm executions list \
  --project-key DEMO \
  --test-set-id a1b2c3d4-0000-0000-0000-000000000001 \
  --limit 2
uip tm executions list \
  --project-key DEMO \
  --test-set-id a1b2c3d4-0000-0000-0000-000000000001 \
  --limit 2

データシェイプ

{
  "Code": "ExecutionsList",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000001",
      "Name": "Nightly Run 2025-04-15",
      "Status": "Passed"
    },
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000002",
      "Name": "Nightly Run 2025-04-14",
      "Status": "Failed"
    }
  ]
}
{
  "Code": "ExecutionsList",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000001",
      "Name": "Nightly Run 2025-04-15",
      "Status": "Passed"
    },
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000002",
      "Name": "Nightly Run 2025-04-14",
      "Status": "Failed"
    }
  ]
}

UIP TM の実行のリストでフィルター処理

高度なサーバー側フィルターを使用して実行のリストを取得します。注: --status--execution-type は単一の単一値フラグです。日付範囲のフィルター処理は、日付フラグではなく --execution-finished-intervalを使用して行われます。

引数

設定はありません。

オプション

フラグ説明
--project-key <key>必須。所有するプロジェクト。
--status <status>1 つの実行ステータスでフィルター処理する。許容値は SDK TestExecutionStatus 列挙型から取得されます。現在のセットに対して --help を実行します。
--execution-type <type>1 つの実行の種類 (automatedmanualmixednone) でフィルター処理します。
--execution-finished-interval <interval>実行がどのくらい前に完了したかでフィルター処理します。許容値は SDK TestExecutionFinishedInterval 列挙型から取得されます。
--updated-by <userId>実行を最後に更新したユーザー ID でフィルター処理します。
--search <text>実行名とメタデータに対するフリー テキスト検索。
--labels <labels...>フィルター処理に使用するスペース区切りのラベル名です。
--test-execution-ids <ids...>スペース区切りの実行 UUID を含めます。
--sort-by <expr>並べ替え式 (フィールド名、任意でサフィックス :asc または :descを付けます)。
--limit <n>ページ サイズ。既定値は 50です。
--offset <n>スキップする結果。既定値は 0です。

uip tm executions list-filtered \
  --project-key DEMO \
  --status Failed \
  --execution-type automated \
  --limit 10
uip tm executions list-filtered \
  --project-key DEMO \
  --status Failed \
  --execution-type automated \
  --limit 10

データシェイプ

{
  "Code": "ExecutionsFilteredList",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000002",
      "Name": "Nightly Run 2025-04-14",
      "Status": "Failed",
      "ExecutionType": "automated"
    }
  ]
}
{
  "Code": "ExecutionsFilteredList",
  "Data": [
    {
      "Id": "b2c3d4e5-0000-0000-0000-000000000002",
      "Name": "Nightly Run 2025-04-14",
      "Status": "Failed",
      "ExecutionType": "automated"
    }
  ]
}

uipTM の実行 テスト ケース ログのリスト

1 回の実行によって生成されたテスト ケース ログを一覧表示します。各ログは、結果、ステータス、タイミングを含む 1 つのテスト ケースの 1 回の実行です。

引数

設定はありません。

オプション

フラグ説明
--execution-id <uuid>必須。検査する実行。
--project-key <key>必須。所有するプロジェクト。
--only-failed失敗したログのみを表示します。
--filter <text>ログを名前で検索する。
--limit <n>ページ サイズ。既定値は 50です。
--offset <n>スキップする結果。既定値は 0です。

uip tm executions testcaselogs list \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --only-failed
uip tm executions testcaselogs list \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --only-failed

データシェイプ

{
  "Code": "ExecutionTestCaseLogs",
  "Data": [
    {
      "Id": "c3d4e5f6-0000-0000-0000-000000000001",
      "TestCaseName": "Login flow",
      "Status": "Finished",
      "Result": "Failed"
    }
  ]
}
{
  "Code": "ExecutionTestCaseLogs",
  "Data": [
    {
      "Id": "c3d4e5f6-0000-0000-0000-000000000001",
      "TestCaseName": "Login flow",
      "Status": "Finished",
      "Result": "Failed"
    }
  ]
}

Id は、テスト ケース ログの UUID です。このファイルを uip tm testcaselogs list-assertions にフィードして、テスト ケース ログがFailedとしてマークされた理由を確認します。

uip tm の実行

ID で既存の実行を再実行します。これは、新しい実行を開始する場合 と同じではなく 、同じ実行レコード内で再生され、すべてのテスト ケースまたは特定のサブセットを対象とします。

注:

新しい実行を開始するには、代わりに uip tm testsets run を使用します。

引数

設定はありません。

オプション

フラグ説明
--project-key <key>必須。所有するプロジェクト。
--execution-id <uuid>必須。再実行する既存の実行の ID です。
--execution-type <type>必須。実行するテスト ケース (automatedmanualmixednone)。
--test-case-log-ids <ids...>スペースで区切られたテスト ケースのログ UUID。指定すると、それらの特定のログのみが再実行されます。
--async確認を待たずに、列に並んだらすぐに戻ってください。

# re-run the entire execution
uip tm executions run \
  --project-key DEMO \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --execution-type automated

# re-run specific failed logs only
uip tm executions run \
  --project-key DEMO \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --execution-type automated \
  --test-case-log-ids c3d4e5f6-0000-0000-0000-000000000001 c3d4e5f6-0000-0000-0000-000000000002
# re-run the entire execution
uip tm executions run \
  --project-key DEMO \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --execution-type automated

# re-run specific failed logs only
uip tm executions run \
  --project-key DEMO \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --execution-type automated \
  --test-case-log-ids c3d4e5f6-0000-0000-0000-000000000001 c3d4e5f6-0000-0000-0000-000000000002

データシェイプ

{
  "Code": "ExecutionRun",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z"
  }
}
{
  "Code": "ExecutionRun",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z"
  }
}

uip tm 実行のリトライ

完了した実行のうち 、失敗した テスト ケースのみをその場でリトライします。このコマンドは実行の統計情報をフェッチし、実行が終了ステートでない限り続行を拒否します。失敗したケースがゼロの場合は、メッセージを表示して 0 終了します。リトライでは、同じ実行 ID が再利用されます。新しい認証は作成されません。

引数

設定はありません。

オプション

フラグ説明
--execution-id <uuid>必須。リトライする実行。
--project-key <key>所有するプロジェクト。これまたは --test-set-key が必要です。
--test-set-key <key>テスト セットのキー (例: DEMO:42)。プロジェクト キーは、プレフィックス から派生しています。
--execution-type <type>リトライの実行の種類です。 automated (既定)、[ manual]、[ mixed]、または [ none] です。

uip tm executions retry \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO
uip tm executions retry \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO

データ形状 — 再試行に失敗した場合

{
  "Code": "ExecutionRetry",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z",
    "RetriedCount": 3
  }
}
{
  "Code": "ExecutionRetry",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Running",
    "StartTime": "2025-04-15T10:30:00Z",
    "RetriedCount": 3
  }
}

データ形状 — 再試行の失敗がない場合

{
  "Code": "ExecutionRetry",
  "Data": {
    "Message": "Execution 'a1b2c3d4-0000-0000-0000-000000000001' has no failed test cases to retry."
  }
}
{
  "Code": "ExecutionRetry",
  "Data": {
    "Message": "Execution 'a1b2c3d4-0000-0000-0000-000000000001' has no failed test cases to retry."
  }
}

uip tm executions get-stats

テスト実行を ID 別に取得します。その実行フィールドと、成功/失敗/なしの集計カウントを含めます。統計情報を含む生の実行レコードが必要な場合に使用します。たとえば、 report getを呼び出す前に実行が完了したかどうかを確認したり、外部レポートのためにタイミングとカバレッジのデータを抽出したりする場合に使用します。

引数

設定はありません。

オプション

フラグ説明
--execution-id <uuid>必須。テスト実行の UUID。これを uip tm testsets run または uip tm testcases runから取得します。
--project-key <key>必須。Test Manager プロジェクト キー (例: DEMO)。

uip tm executions get-stats \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO
uip tm executions get-stats \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO

データシェイプ

{
  "Code": "ExecutionGetStats",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Nightly Run 2025-04-15",
    "Description": "Smoke + regression suite",
    "Status": "Finished",
    "ExecutionType": "automated",
    "Source": "Manual",
    "ProjectId": "00000000-0000-0000-0000-000000000abc",
    "TestSetId": "a1b2c3d4-0000-0000-0000-000000000010",
    "TestSetObjKey": "DEMO:10",
    "Passed": 8,
    "Failed": 2,
    "None": 0,
    "Duration": 3600000,
    "RunId": 12,
    "EnforceExecutionOrder": false,
    "EnableCoverage": false,
    "IsRunningAutomated": false,
    "HasTestsFromMultipleAutomationProjects": false,
    "RemoteControlAccess": "Disabled",
    "ExecutionStart": "2025-04-15T10:00:00Z",
    "ExecutionFinished": "2025-04-15T11:00:00Z",
    "ReportingDate": "2025-04-15T11:00:00Z",
    "FolderKey": "11111111-2222-3333-4444-555555555555",
    "Created": "2025-04-15T09:55:00Z",
    "CreatedBy": "11111111-2222-3333-4444-555555555555",
    "Updated": "2025-04-15T11:00:00Z",
    "UpdatedBy": "11111111-2222-3333-4444-555555555555",
    "AutopilotForRobotsSettings": { "Enabled": false },
    "OrderedExecutionSettings": { "Enabled": false },
    "VideoRecordingSettings": { "Enabled": false }
  }
}
{
  "Code": "ExecutionGetStats",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Nightly Run 2025-04-15",
    "Description": "Smoke + regression suite",
    "Status": "Finished",
    "ExecutionType": "automated",
    "Source": "Manual",
    "ProjectId": "00000000-0000-0000-0000-000000000abc",
    "TestSetId": "a1b2c3d4-0000-0000-0000-000000000010",
    "TestSetObjKey": "DEMO:10",
    "Passed": 8,
    "Failed": 2,
    "None": 0,
    "Duration": 3600000,
    "RunId": 12,
    "EnforceExecutionOrder": false,
    "EnableCoverage": false,
    "IsRunningAutomated": false,
    "HasTestsFromMultipleAutomationProjects": false,
    "RemoteControlAccess": "Disabled",
    "ExecutionStart": "2025-04-15T10:00:00Z",
    "ExecutionFinished": "2025-04-15T11:00:00Z",
    "ReportingDate": "2025-04-15T11:00:00Z",
    "FolderKey": "11111111-2222-3333-4444-555555555555",
    "Created": "2025-04-15T09:55:00Z",
    "CreatedBy": "11111111-2222-3333-4444-555555555555",
    "Updated": "2025-04-15T11:00:00Z",
    "UpdatedBy": "11111111-2222-3333-4444-555555555555",
    "AutopilotForRobotsSettings": { "Enabled": false },
    "OrderedExecutionSettings": { "Enabled": false },
    "VideoRecordingSettings": { "Enabled": false }
  }
}

主なフィールド

  • PassedFailedNone — 実行のテスト ケースのログ数を集計したものです。
  • Duration — 合計実行時間 (ミリ秒単位)。
  • Status — 実行ステートです。Finishedすると、Passed/Failed/Noneのカウントが最終的になります。
  • IsRunningAutomated — 自動化されたテスト ケースがロボットにまだディスパッチされている間に true します。
注:

get-stats 、生の実行レコードをカウント付きで返します。テスト ケースごとの失敗メッセージを含む形式化された要約を作成するには、代わりに uip tm report get を使用します。

終了コード

標準の CI パターンは、次の 3 段階のパイプラインです。

  1. 起動uip tm testsets run ExecutionId を返し、 0終了します。
  2. ブロック — 実行が終了ステートに達するまでポーリング uip tm wait 。終了時に 0 (タイムアウト時に2、失敗時に1) 終了します。
  3. 評決uip tm report getPassed / Failedカウントを読み取ります。スクリプトがビルドに明示的に失敗する。
id=$(uip tm testsets run \
  --test-set-key DEMO:10 \
  --execution-type automated \
  --output-filter .Data.ExecutionId)

if ! uip tm wait --execution-id "$id" --project-key DEMO --timeout 1800000; then
  code=$?
  [ "$code" -eq 2 ] && { echo "timed out" >&2; exit 2; }
  echo "wait failed ($code)" >&2; exit "$code"
fi

failed=$(uip tm report get \
  --execution-id "$id" --project-key DEMO --output-filter .Data.Failed)
[ "$failed" -gt 0 ] && { echo "$failed test(s) failed" >&2; exit 1; }
echo "all passed"
id=$(uip tm testsets run \
  --test-set-key DEMO:10 \
  --execution-type automated \
  --output-filter .Data.ExecutionId)

if ! uip tm wait --execution-id "$id" --project-key DEMO --timeout 1800000; then
  code=$?
  [ "$code" -eq 2 ] && { echo "timed out" >&2; exit 2; }
  echo "wait failed ($code)" >&2; exit "$code"
fi

failed=$(uip tm report get \
  --execution-id "$id" --project-key DEMO --output-filter .Data.Failed)
[ "$failed" -gt 0 ] && { echo "$failed test(s) failed" >&2; exit 1; }
echo "all passed"
  • testsets run — 実行を開始します。
  • 待機 — 実行が終了ステートに達するまでブロックします。
  • ReportResultAttachment — 実行後の成果物。
  • テスト ケース — 失敗したログをアサーションごとの詳細情報に変換 testcaselogs list-assertions

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得