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

UIP TM アタッチメント

uip tm attachment は、テスト実行のテスト ケース ログに関連付けられたファイル (スクリーンショット、シリアル化されたステート、記録されたログ、オートメーションがログに添付したファイル) をダウンロードしてアップロードします。

概要

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 upload --object-id <uuid> --object-type <type> --file <path>
                         [--project-key <key>] [--test-set-key <key>]
                         [--source <source>] [--attachment-type <type>]
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 upload --object-id <uuid> --object-type <type> --file <path>
                         [--project-key <key>] [--test-set-key <key>]
                         [--source <source>] [--attachment-type <type>]

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

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

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

引数

設定はありません。

オプション

  • --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> — 出力ディレクトリ。デフォルトは、現在の作業ディレクトリです。ディレクトリが見つからない場合は作成されます。

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

# only failed tests
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
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
  }
}

データ シェイプ — 一部の添付ファイルが失敗しました

{
  "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"]
  }
}

uip tm 添付ファイルのアップロード

ファイルを添付ファイルとしてテスト ケース ログまたは他の Test Manager オブジェクトにアップロードします。

引数

設定はありません。

オプション

  • --object-id <uuid> (必須) — ファイルの添付先のオブジェクトの UUID (テスト ケース ログ ID など)。
  • --object-type <type> (必須) — オブジェクトのタイプ。uip tm attachment upload --helpを実行して、許容値を確認します。
  • --file <path> (必須) — アップロードするファイルへのローカル パスです。
  • --project-key <key> — 所有プロジェクト。アップロードのコンテキストは任意です。
  • --test-set-key <key> — テストセットキー。アップロードのコンテキストは任意です。
  • --source <source> — 添付ファイルのソース識別子。任意です。
  • --attachment-type <type> — 添付ファイルの分類 ( screenshotlogなど) です。任意です。

uip tm attachment upload \
  --object-id c3d4e5f6-0000-0000-0000-000000000001 \
  --object-type TestCaseLog \
  --file ./screenshot.png \
  --project-key DEMO \
  --attachment-type screenshot
uip tm attachment upload \
  --object-id c3d4e5f6-0000-0000-0000-000000000001 \
  --object-type TestCaseLog \
  --file ./screenshot.png \
  --project-key DEMO \
  --attachment-type screenshot

データシェイプ

{
  "Code": "AttachmentUpload",
  "Data": {
    "AttachmentId": "d4e5f6a7-0000-0000-0000-000000000001",
    "ObjectId": "c3d4e5f6-0000-0000-0000-000000000001",
    "ObjectType": "TestCaseLog",
    "FileName": "screenshot.png",
    "Result": "Uploaded"
  }
}
{
  "Code": "AttachmentUpload",
  "Data": {
    "AttachmentId": "d4e5f6a7-0000-0000-0000-000000000001",
    "ObjectId": "c3d4e5f6-0000-0000-0000-000000000001",
    "ObjectType": "TestCaseLog",
    "FileName": "screenshot.png",
    "Result": "Uploaded"
  }
}
  • testsets rundownloadで使用されるExecutionIdを生成します。
  • 待機 — 実行が終了するまでブロックしてから添付ファイルをプルします。
  • result — 同じ実行のJUnit XML。
  • レポート — 人間が判読できる要約。

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得