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

UiPath CLI ユーザー ガイド

UIP TM アタッチメント

uip tm attachment は、テスト実行のテスト ケース ログによってキャプチャされたファイル (スクリーンショット、シリアル化されたステート、記録されたログ、オートメーションがログに添付したファイル) をダウンロードします。実行後に、通常は uip tm result downloadからの JUnit レポートと一緒に、証拠を CI ワークスペースにプルするために使用します。

概要

uip tm attachment download --execution-id <uuid> (--project-key <key> | --test-set-key <key>)
                           [--test-case-name <name>][--only-failed] [--result-path <path>]
uip tm attachment download --execution-id <uuid> (--project-key <key> | --test-set-key <key>)
                           [--test-case-name <name>]… [--only-failed] [--result-path <path>]

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

uip tm 添付ファイルのダウンロード

1 回の実行のテスト ケース ログの添付ファイルをダウンロードします。このコマンドは、ログをページングし、必要に応じて不合格のみのテスト ケースまたは名前付きのテスト ケースに絞り込んでから、すべての添付ファイルのリストを表示して、 --result-pathの下のテスト ケースごとのサブディレクトリにダウンロードします。個々の添付ファイルの失敗はログに記録され、 Skipped フィールドに記録されます。全体的な実行は中止されません。

引数

設定はありません。

オプション

  • --execution-id <uuid> (必須) — 添付ファイルをプルする実行。
  • --project-key <key> — 所有プロジェクト。これまたは --test-set-key が必要です。
  • --test-set-key <key> — テスト セット キー (例:DEMO:42);プロジェクト キーはプレフィックスから派生します。
  • --test-case-name <name> — テスト ケース名 (大文字と小文字を区別しない部分文字列) でフィルター処理します。複数の名前のいずれかを受け入れるために 繰り返す ことができます。照合はパッケージのエントリ ポイント名と照合され、テスト ケース名とオートメーション テスト ケース名にフォールバックされます。
  • --only-failed — 結果 Failedを含むテスト ケース ログの添付ファイルのみをダウンロードします。
  • --result-path <path> — 出力ディレクトリ。既定では、現在の作業ディレクトリ (.) が使用されます。ディレクトリが見つからない場合は作成されます。

ディスク上のレイアウト

<result-path>/
  <sanitized test case name>/
    <sanitized attachment file name>
    <sanitized attachment file name>
  <sanitized test case name>/
    <sanitized attachment file name>
<result-path>/
  <sanitized test case name>/
    <sanitized attachment file name>
    <sanitized attachment file name>
  <sanitized test case name>/
    <sanitized attachment file name>

ファイル名とディレクトリ名はサニタイズされます — Windows または Unix で無効な文字 (< > : " / \ | ? * 文字と制御文字) は _に置き換えられ、名前は 200 文字に切り捨てられます。

# download everything
uip tm attachment download \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --result-path ./attachments

# only failed tests, narrowed to two named cases
uip tm attachment download \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --only-failed \
  --test-case-name login \
  --test-case-name checkout \
  --result-path ./attachments
# download everything
uip tm attachment download \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --result-path ./attachments

# only failed tests, narrowed to two named cases
uip tm attachment download \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --only-failed \
  --test-case-name login \
  --test-case-name checkout \
  --result-path ./attachments

データシェイプ

通常の実行:

{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "OutputPath": "./attachments",
    "Downloaded": 3,
    "MatchedTestCases": 2
  }
}
{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "OutputPath": "./attachments",
    "Downloaded": 3,
    "MatchedTestCases": 2
  }
}

フィルターに一致するテスト ケース ログがない場合:

{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "No matching test case logs found.",
    "Downloaded": 0
  }
}
{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "No matching test case logs found.",
    "Downloaded": 0
  }
}

一部の添付ファイルのリスト表示またはダウンロードに失敗した場合、 Skipped 配列には、失敗ごとに 1 つのエントリが追加され "<test case name>: <error message>"

{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "OutputPath": "./attachments",
    "Downloaded": 2,
    "MatchedTestCases": 3,
    "Skipped": ["Login flow: HTTP 404: Not Found"]
  }
}
{
  "Code": "AttachmentDownload",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "OutputPath": "./attachments",
    "Downloaded": 2,
    "MatchedTestCases": 3,
    "Skipped": ["Login flow: HTTP 404: Not Found"]
  }
}
  • testsets run — ここで消費される ExecutionId を生成します。
  • 待機 — 実行が終了するまでブロックしてから添付ファイルをプルします。
  • result — 同じ実行のJUnit XML。
  • レポート — 人間が判読できる要約。

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得