- 概要
- はじめに
- 概念
- UiPath CLI を使用する
- UiPath for Coding Agents
- 使用ガイド
- CI/CD レシピ
- コマンド リファレンス
- 概要
- 終了コード
- グローバル オプション
- uip codedagent
- uip docsai
- add-test-data-entity
- テスト データのキューを追加
- 追加-テスト-データ-バリエーション
- 分析
- 開発
- プロジェクトを作成
- 差分
- アクティビティを検索
- GET-ANALYZER-RULES
- get-default-activity-xaml
- エラーを取得
- 手動テスト用のテスト ケースを取得
- 手動テストステップを取得
- get-versions
- Get-workflow-example
- indicate-application
- 要素を示す
- inspect-package
- install-data-fabric-entities
- パッケージのインストールまたは更新
- list-data-fabric-entities
- list-workflow-examples
- パッケージ化
- 元に戻す
- ファイル名を実行
- 検索テンプレート
- スタートスタジオ
- 実行を停止
- UIA
- UIP トレース
- 移行
- 参照とサポート
UiPath CLI ユーザー ガイド
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 listのIdフィールド)。--filter <text>— 実行を名前で検索します。--status <status>— 実行ステータスでフィルター処理します。指定できる値は、SDKTestExecutionStatus列挙型です。--execution-type <type>— 実行の種類でフィルター処理します。SDKExecutionType列挙型 (automated、manual、mixed、none) から取得できます。--execution-finished-interval <interval>— 実行がいつ完了したかでフィルター処理します。指定できる値は、SDKTestExecutionFinishedInterval列挙型です。--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...>— 含めるスペース区切りの結果。指定できる値は、SDKResult列挙型です。--statuses <statuses...>— スペースで区切られた実行ステータスです。指定できる値は、SDKTestCaseLogExecutionStatus列挙型です。--duration-period <period>— 期間バケットでフィルター処理します。指定できる値は、SDKDurationPeriod列挙型です。--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終了します)。 - 失敗したケースがゼロの場合、
Message封筒を印刷して0を終了しますが、これは意図的にエラーではありません。 - それ以外の場合は、失敗したテスト ケース ログ 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 段階のパイプラインです。
- Launch —
uip tm testsets runExecutionIdを返し、実行がキューに置かれるとすぐに0を終了します。 - ブロック — 実行が終了ステートに達するまでポーリング
uip tm wait --execution-id <id> --timeout <seconds>。- 実行が終了すると
0終了します(合格/不合格に関係なく、ここでは「完了」が成功シグナルです)。 - 有効期限が切れると
2--timeout終了します。これはドメイン固有です: 共有コントラクトはAuthenticationError用に2を予約しますが、waitテキストを解析せずにスクリプトが「時間がかかりすぎた」で分岐できるように、TimeoutErrorに再利用します。これについては、終了コードuip tm waitのメモを参照してください。 - API の失敗、中断、または中止時に
1終了します。
- 実行が終了すると
- 評決 —
uip tm report get --execution-id <id>Passed/Failed/Skipped/PassRateと表示されます。スクリプトはパスの外観を決定し、ビルドを明示的に失敗します (例:exit 1Failed > 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.
- 待機 — 実行が終了ステートに達するまでブロックします。
- Report、 Result、 Attachment — 実行後の成果物。
- testcases —
testcaselogs list-assertionsturns a failed log into per-assertion detail.
参照
- Test Manager の概要
- 終了コード — 共有契約。
- スクリプティングパターン — 3ステップの起動-待機-検証パイプラインの詳細。