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

UiPath CLI ユーザー ガイド

最終更新日時 2026年5月20日

uip tm executions

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

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

概要

uip tm executions list --project-key <key> --test-set-id <uuid> [filters…]
uip tm executions testcaselogs list --execution-id <uuid> --project-key <key> [filters…]
uip tm executions retry --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--execution-type <type>]
uip tm executions list --project-key <key> --test-set-id <uuid> [filters…]
uip tm executions testcaselogs list --execution-id <uuid> --project-key <key> [filters…]
uip tm executions retry --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--execution-type <type>]

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

uip tm executions list

テスト セットに関連付けられた実行のリストを表示します。フィルターはサーバー側で適用されます。CLI は、呼び出しごとに --top / --skipでサイズ設定された 1 ページを返します。

引数:なし。

オプション:

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-set-id <uuid> (必須) — テスト セット UUID (TestSetKeyではなく testsets listIdフィールド)。
  • --filter <text> — 実行を名前で検索します。
  • --status <status> — 実行ステータスでフィルター処理します。指定できる値は、SDK TestExecutionStatus 列挙型です。
  • --execution-type <type> — 実行の種類でフィルター処理します。SDK ExecutionType 列挙型 (automatedmanualmixednone) から取得できます。
  • --execution-finished-interval <interval> — 実行がいつ完了したかでフィルター処理します。指定できる値は、SDK TestExecutionFinishedInterval 列挙型です。
  • --top <number> — ページ サイズ。既定値は [ 50です。
  • --skip <number> — スキップする結果。既定値は [ 0です。
注:

--status--execution-type--execution-finished-interval で受け入れられる正確な列挙値が、実行時に Test Manager SDK から生成されます。uip tm executions list --helpを実行して、インストールされているツールのバージョンの現在のセットを確認します。

:

uip tm executions list \
  --project-key DEMO \
  --test-set-id a1b2c3d4-0000-0000-0000-000000000001 \
  --top 2
uip tm executions list \
  --project-key DEMO \
  --test-set-id a1b2c3d4-0000-0000-0000-000000000001 \
  --top 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 executions testcaselogs list

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

引数:なし。

オプション:

  • --execution-id <uuid> (必須) — 検証する実行。
  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --only-failed — 「失敗したログのみを表示」のショートカット。
  • --filter <text> — ログを名前で検索します。
  • --results <results...> — 含めるスペース区切りの結果。指定できる値は、SDK Result 列挙型です。
  • --statuses <statuses...> — スペースで区切られた実行ステータスです。指定できる値は、SDK TestCaseLogExecutionStatus 列挙型です。
  • --duration-period <period> — 期間バケットでフィルター処理します。指定できる値は、SDK DurationPeriod 列挙型です。
  • --top <number> — ページ サイズ。既定値は [ 50です。
  • --skip <number> — スキップする結果。既定値は [ 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 executions retry

完了した実行のうち、失敗したテスト ケースのみを その場でリトライします。このコマンドは、以下のとおりです。

  1. 実行の統計情報をフェッチし、実行が終了ステートでない限り続行を拒否します (終了ステートでない場合は、ガイダンス メッセージを表示して 1 終了します)。
  2. 失敗したケースがゼロの場合、 Message 封筒を印刷して 0 を終了しますが、これは意図的にエラーではありません。
  3. それ以外の場合は、失敗したテスト ケース ログ ID (ページング) をすべて収集し、それらのログのみを対象にしたリトライを開始します。

リトライでは、同じ実行 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 …動詞はすべて、標準の終了コードに従います (成功時 (再試行するものが見つからない場合もretry0)、1 は一般的なエラー、2 は認証エラー、3 は検証エラーです。

Test Manager の実行ライフサイクルでは、明示的に呼び出す価値のある動作が 1 つ追加されます。その動作は、実行動詞自体ではなく、 waitに存在します。

「タイムアウト」と「失敗で終了」を区別する

テストが失敗したためにゼロ以外から出る単一のtm動詞はありません。標準の CI パターンは、次の 3 段階のパイプラインです。

  1. Launchuip tm testsets run ExecutionId を返し、実行がキューに置かれるとすぐに 0 を終了します。
  2. ブロック — 実行が終了ステートに達するまでポーリング uip tm wait --execution-id <id> --timeout <seconds>
    • 実行が終了すると 0 終了します(合格/不合格に関係なく、ここでは「完了」が成功シグナルです)。
    • 有効期限が切れると2--timeout終了します。これはドメイン固有です: 共有コントラクトはAuthenticationError用に2を予約しますが、waitテキストを解析せずにスクリプトが「時間がかかりすぎた」で分岐できるように、TimeoutErrorに再利用します。これについては、終了コードuip tm waitのメモを参照してください。
    • API の失敗、中断、または中止時に 1 終了します。
  3. 評決uip tm report get --execution-id <id> Passed / Failed / Skipped / PassRateと表示されます。スクリプトはパスの外観を決定し、ビルドを明示的に失敗します (例:exit 1 Failed > 0)。report get 自体は、要約している実行の結果に関係なく、要約を正常に生成するたびに 0 終了します。
# Start the run
id=$(uip tm testsets run --test-set-key DEMO:10 --output-filter .Data.ExecutionId)

# Block with a timeout; branch on the outcome
if ! uip tm wait --execution-id "$id" --timeout 1800; then
  code=$?
  if [ "$code" -eq 2 ]; then
    echo "timed out" >&2
    exit 2
  fi
  echo "wait failed ($code)" >&2
  exit "$code"
fi

# Decide pass/fail from the summary
failed=$(uip tm report get --execution-id "$id" --project-key DEMO --output-filter .Data.Failed)
if [ "$failed" -gt 0 ]; then
  echo "$failed test case(s) failed" >&2
  exit 1
fi
echo "all passed"
# Start the run
id=$(uip tm testsets run --test-set-key DEMO:10 --output-filter .Data.ExecutionId)

# Block with a timeout; branch on the outcome
if ! uip tm wait --execution-id "$id" --timeout 1800; then
  code=$?
  if [ "$code" -eq 2 ]; then
    echo "timed out" >&2
    exit 2
  fi
  echo "wait failed ($code)" >&2
  exit "$code"
fi

# Decide pass/fail from the summary
failed=$(uip tm report get --execution-id "$id" --project-key DEMO --output-filter .Data.Failed)
if [ "$failed" -gt 0 ]; then
  echo "$failed test case(s) failed" >&2
  exit 1
fi
echo "all passed"
  • testsets run — start an execution.
  • 待機 — 実行が終了ステートに達するまでブロックします。
  • ReportResultAttachment — 実行後の成果物。
  • testcasestestcaselogs list-assertions turns a failed log into per-assertion detail.

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得