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

UiPath CLI ユーザー ガイド

UIP TM の実行

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>

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

uip tm 実行のリスト

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

引数

設定はありません。

オプション

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --test-set-id <uuid> — テストセットのUUID(testsets listIdフィールドであり、TestSetKeyではありません)。
  • --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> — 単一の実行ステータスでフィルター処理します。指定できる値は、SDK TestExecutionStatus 列挙型です。--helpを実行して、現在のセットを確認します。
  • --execution-type <type> — 単一の実行の種類 (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 testcaselog 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 で取得し、合格/不合格/なしのカウントを集計します。これを使用して、レポートを完全に取得せずに、完了した実行の最終判定を読み取ります。

引数

設定はありません。

オプション

  • --execution-id <uuid> (必須) — テスト実行 UUID。
  • --project-key <key> (必須) — プロジェクトを所有しています。

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": "ExecutionStats",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Nightly Run 2025-04-15",
    "Status": "Finished",
    "ExecutionType": "automated",
    "Passed": 8,
    "Failed": 2,
    "None": 0,
    "ExecutionStart": "2025-04-15T10:00:00Z",
    "ExecutionFinished": "2025-04-15T11:00:00Z"
  }
}
{
  "Code": "ExecutionStats",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Nightly Run 2025-04-15",
    "Status": "Finished",
    "ExecutionType": "automated",
    "Passed": 8,
    "Failed": 2,
    "None": 0,
    "ExecutionStart": "2025-04-15T10:00:00Z",
    "ExecutionFinished": "2025-04-15T11:00:00Z"
  }
}

終了コード

標準の 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 \
  --project-key DEMO \
  --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 \
  --project-key DEMO \
  --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 — 実行後の成果物。
  • テスト ケース — 失敗したログをアサーションごとの詳細情報に変換 testcaselog list-assertions

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得