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

UIP TM のパフォーマンス シナリオ

「uip tm perf-scenario」の構文とオプション。Test Manager のパフォーマンス シナリオを作成および実行し、実行データを検査して、レポートを生成します。

Test Manager のパフォーマンス シナリオは、uip tm perf-scenario で管理します。シナリオを作成し、テスト ケースを負荷プロファイル (仮想ユーザー、ランプ アップ/ピーク/ランプ ダウンのタイミング、SLO しきい値) を持つ負荷グループとしてシナリオにバインドし、高速ドライ ランまたはフル負荷テストとして実行してから、結果の実行データを検査してレポートを表示します。

重要:

このページでは、実際に完全に出荷されたコマンドグループについて説明します — 機能フラグの後ろではなく、他のすべての uip tm コマンドと一緒に無条件に登録されます。このサーフェスが存在しない場合、またはプレリリースであると言われた場合は、 uip tm perf-scenario --helpで直接確認してください。

このリソースは、次の 4 ページで構成されています。

  • このページ には、概念とシナリオのライフサイクルを示します: create、 get、 list、 execute、 stop、 list-dry-run-reports。
  • 負荷グループ — load-groups add/update/remove/list、テスト ケースとシナリオのバインド、およびその負荷プロファイル
  • 実行データ — executions list、results get、http-errors list、automation-errors list、transaction-metrics list
  • レポート — report generate、report compare

概念​

  • シナリオ — 最上位のパフォーマンス テスト定義です (--scenario-key、例: SP1:7)。createで作成し、getで検査し、executeで実行します。
  • 負荷グループ — ロード プロファイル (仮想ユーザー、タイミング、SLO しきい値、ロボットの種類) を持つシナリオにバインドされた 1 つのテスト ケース。1 つのシナリオに複数の負荷グループを含めることができます。「 負荷グループ」をご覧ください。
  • 実行 — シナリオの 1 回の実行 ( dryRun (高速スモーク実行) または performanceTesting (各負荷グループの負荷プロファイルを尊重する全負荷実行)。executeで開始し、実行データで検査し、stopで早期に停止しました。
  • ドライ・ラン・レポート — パフォーマンス・サービスは、ドライ・ランが合格した後にレポートを記録します。完全な performanceTesting 実行には、少なくとも 1 つの合格ドライラン レポートが既に存在する必要があります。フルロード テストを実行する前に、 list-dry-run-reports に確認してください。

4 ページすべてのほとんどの read 動詞は --query <expr>を受け入れます。これは、印刷される前にクライアント側で出力 Data に適用された jq スタイルのフィルターです — これを使用して、大きなペイロードを絞り込みます (以下の list 例を参照)。

概要​

uip tm perf-scenario create --project-key <key> --name <name> [--description <text>] [--version <version>] [--app-type <type>] [--perf-test-type <type>] [--responsiveness <level>]
uip tm perf-scenario get --scenario-key <key> [--project-key <key>]
uip tm perf-scenario list --project-key <key> [--search <text>] [--limit <n>] [--offset <n>] [--query <expr>]
uip tm perf-scenario execute --scenario-key <key> [--project-key <key>] [--execution-type <dryRun|performanceTesting>] [--wait [--full] [--poll-interval-sec <n>] [--timeout-sec <n>]]
uip tm perf-scenario stop --execution-id <uuid> --project-key <key>
uip tm perf-scenario list-dry-run-reports --scenario-key <key> [--project-key <key>]
uip tm perf-scenario create --project-key <key> --name <name> [--description <text>] [--version <version>] [--app-type <type>] [--perf-test-type <type>] [--responsiveness <level>]
uip tm perf-scenario get --scenario-key <key> [--project-key <key>]
uip tm perf-scenario list --project-key <key> [--search <text>] [--limit <n>] [--offset <n>] [--query <expr>]
uip tm perf-scenario execute --scenario-key <key> [--project-key <key>] [--execution-type <dryRun|performanceTesting>] [--wait [--full] [--poll-interval-sec <n>] [--timeout-sec <n>]]
uip tm perf-scenario stop --execution-id <uuid> --project-key <key>
uip tm perf-scenario list-dry-run-reports --scenario-key <key> [--project-key <key>]

すべての動詞は、 グローバル オプション と標準の 終了コードを尊重します。perf-scenario の 4 ページすべての動詞は --log-level <level> (既定Information) を受け入れます。

注:

--project-keyは、このページの create と stop (および load-groups update/remove/list — 「負荷グループ」をご覧ください) の.requiredOption()にすぎません。get、execute、および list-dry-run-reports では任意です。省略すると、プロジェクトは --scenario-key のプレフィックス (例: SP1:7 → project SP1) から派生し--project-key、渡された場合はその派生を上書きします。[ 実行データ ] ページと [ レポート ] ページの動詞はまったく --project-key しません (ただし、2 つの report 動詞は任意で、返されたリンクによってアプリ内のレポート ページが開くかどうかにのみ影響します)。これらの動詞は、Test Manager プロジェクトを解決するのではなく、パフォーマンス サービスを直接呼び出します。

uip tm perf-scenario 作成​

Test Manager プロジェクトでパフォーマンス シナリオを作成します。

オプション​

フラグ説明
--project-key <key>必須。所有するプロジェクト。
--name <name>必須。シナリオ名。
--description <text>シナリオの説明。既定では空です。最大 5120 文字です。
--version <version>シナリオ バージョン文字列。既定値は 1.0です。最大 255 文字です。
--app-type <type>アプリケーションの種類: web、 apiService、 ecommerce、 gaming、 financial、 healthcare、 saaS、 streaming、 messaging、 enterprise。既定値は webです。
--perf-test-type <type>パフォーマンス テストの種類: loadTesting、 stressTesting、 enduranceTesting、 spikeTesting。既定値は loadTestingです。
--responsiveness <level>期待される応答性: instant、 fast、 moderate、 slow、 verySlow。既定値は fastです。
uip tm perf-scenario create \
  --project-key SP1 \
  --name "Checkout load" \
  --app-type web \
  --perf-test-type loadTesting \
  --responsiveness fast
uip tm perf-scenario create \
  --project-key SP1 \
  --name "Checkout load" \
  --app-type web \
  --perf-test-type loadTesting \
  --responsiveness fast

データシェイプ​

{
  "Code": "ScenarioCreate",
  "Data": {
    "ScenarioKey": "SP1:7",
    "Name": "Checkout load",
    "Version": "1.0",
    "AppType": "web",
    "PerfTestType": "loadTesting",
    "Responsiveness": "fast"
  }
}
{
  "Code": "ScenarioCreate",
  "Data": {
    "ScenarioKey": "SP1:7",
    "Name": "Checkout load",
    "Version": "1.0",
    "AppType": "web",
    "PerfTestType": "loadTesting",
    "Responsiveness": "fast"
  }
}

uip tm perf-scenario get​

シナリオのメタデータと、それにバインドされている負荷グループを取得します。

オプション​

フラグ説明
--scenario-key <key>必須。シナリオ オブジェクト キー (例: SP1:7)。
--project-key <key>所有するプロジェクト。任意 — 省略する場合は --scenario-key のプレフィックスから派生します。
uip tm perf-scenario get --scenario-key SP1:7
uip tm perf-scenario get --scenario-key SP1:7

データシェイプ​

{
  "Code": "ScenarioGet",
  "Data": {
    "ScenarioKey": "SP1:7",
    "Name": "Checkout load",
    "Version": "1.0",
    "Description": "",
    "AppType": "web",
    "PerfTestType": "loadTesting",
    "Responsiveness": "fast",
    "LoadGroups": [
      {
        "LoadGroupId": "8e322581-0a25-0000-738b-0b49fd936ca1",
        "TestCaseKey": "SP1:602",
        "Name": "Checkout flow",
        "PackageName": "Checkout_Tests",
        "PackageVersion": "1.0.2",
        "FolderKey": "94821c49-ab85-49cb-94e1-f82c6d8973be",
        "VirtualUsers": 20,
        "Enabled": true
      }
    ]
  }
}
{
  "Code": "ScenarioGet",
  "Data": {
    "ScenarioKey": "SP1:7",
    "Name": "Checkout load",
    "Version": "1.0",
    "Description": "",
    "AppType": "web",
    "PerfTestType": "loadTesting",
    "Responsiveness": "fast",
    "LoadGroups": [
      {
        "LoadGroupId": "8e322581-0a25-0000-738b-0b49fd936ca1",
        "TestCaseKey": "SP1:602",
        "Name": "Checkout flow",
        "PackageName": "Checkout_Tests",
        "PackageVersion": "1.0.2",
        "FolderKey": "94821c49-ab85-49cb-94e1-f82c6d8973be",
        "VirtualUsers": 20,
        "Enabled": true
      }
    ]
  }
}

LoadGroupId ここにシナリオの負荷グループ ID を示します。これは load-groups update 識別子であり、予期 load-groups remove 識別子です ( 「負荷グループ」をご覧ください)。これは、 によって返される実行ごとの行 load-groups list異なる ID です。

UIP TM のパフォーマンス シナリオ リスト​

プロジェクト内のパフォーマンス シナリオを一覧表示します。

オプション​

フラグ説明
--project-key <key>必須。所有するプロジェクト。
--search <text>シナリオを名前またはキーでフィルター処理します。
--limit <n>返される結果の最大数。省略すると、既定でサービス独自のページ サイズが使用されます。
--offset <n>ページングの場合はスキップする結果既定値は 0です。
--query <expr>出力データに適用される JQ スタイルのフィルターです。
uip tm perf-scenario list --project-key DEMO
uip tm perf-scenario list --project-key DEMO
# search by name, narrowing the output to just the scenario rows
uip tm perf-scenario list --project-key DEMO --search checkout --query .Scenarios
# search by name, narrowing the output to just the scenario rows
uip tm perf-scenario list --project-key DEMO --search checkout --query .Scenarios

データシェイプ​

{
  "Code": "PerfScenariosList",
  "Data": {
    "Total": 2,
    "Count": 2,
    "Scenarios": [
      {
        "ScenarioKey": "DEMO:7",
        "Name": "Checkout load",
        "Version": "1.0",
        "AppType": "web",
        "PerfTestType": "loadTesting",
        "Responsiveness": "fast",
        "VirtualUsers": 20,
        "DurationMinutes": 0,
        "Updated": "2025-04-15T10:30:00Z",
        "UpdatedBy": "alice@example.com"
      },
      {
        "ScenarioKey": "DEMO:9",
        "Name": "Search stress",
        "Version": "1.0",
        "AppType": "web",
        "PerfTestType": "stressTesting",
        "Responsiveness": "fast",
        "VirtualUsers": 100,
        "DurationMinutes": 0,
        "Updated": "2025-04-15T10:30:00Z",
        "UpdatedBy": "alice@example.com"
      }
    ]
  }
}
{
  "Code": "PerfScenariosList",
  "Data": {
    "Total": 2,
    "Count": 2,
    "Scenarios": [
      {
        "ScenarioKey": "DEMO:7",
        "Name": "Checkout load",
        "Version": "1.0",
        "AppType": "web",
        "PerfTestType": "loadTesting",
        "Responsiveness": "fast",
        "VirtualUsers": 20,
        "DurationMinutes": 0,
        "Updated": "2025-04-15T10:30:00Z",
        "UpdatedBy": "alice@example.com"
      },
      {
        "ScenarioKey": "DEMO:9",
        "Name": "Search stress",
        "Version": "1.0",
        "AppType": "web",
        "PerfTestType": "stressTesting",
        "Responsiveness": "fast",
        "VirtualUsers": 100,
        "DurationMinutes": 0,
        "Updated": "2025-04-15T10:30:00Z",
        "UpdatedBy": "alice@example.com"
      }
    ]
  }
}

Total はサーバーによって報告された一致の合計数です。--limit がページを切り捨てると、Count (実際に返される行数) を超える可能性があります。

UIP TM のパフォーマンス シナリオの実行​

シナリオを実行し、その実行 ID を返す既定のモードは dryRun (高速スモーク ラン) です。各負荷グループの load-profile フラグに従って、全負荷実行の --execution-type performanceTesting を渡します。完全実行には、少なくとも 1 つの合格ドライラン レポートがすでに存在する必要があります。最初に list-dry-run-reports に確認してください。

オプション​

フラグ説明
--scenario-key <key>必須。シナリオ オブジェクト キー (例: SP1:7)。
--project-key <key>所有するプロジェクト。任意 — 省略する場合は --scenario-key のプレフィックスから派生します。
--execution-type <type>dryRun または performanceTesting。 既定値は dryRun です。
--wait実行が最終ステート (Finished または Cancelled) に達するまでポーリングし、 results get と同じ図形を出力します ( 「実行データ」を参照)。実行が Cancelled、オートメーションの設定が失敗した場合、または SLO に違反した場合は、ゼロ以外で終了します。
--full--waitでは、秒単位の時系列 (AggregatedData + AggregatedDataWithTransaction) を出力に含めます。を --waitせずに渡された場合エラー 。
--poll-interval-sec <n>--waitの場合、ステータス チェック間隔は秒です。既定値は 12です。を --waitせずに渡された場合エラー 。
--timeout-sec <n>--waitの場合、待機する最大秒数です (0 = タイムアウトなし)。既定値は 1800です。を --waitせずに渡された場合エラー 。経過は 4 を終了します。実行は続行されるため、 results getで再確認してください。
# start a dry run and return immediately
uip tm perf-scenario execute --scenario-key SP1:7
# start a dry run and return immediately
uip tm perf-scenario execute --scenario-key SP1:7
# run a full performance test and wait for the results bundle
uip tm perf-scenario execute \
  --scenario-key SP1:7 \
  --execution-type performanceTesting \
  --wait
# run a full performance test and wait for the results bundle
uip tm perf-scenario execute \
  --scenario-key SP1:7 \
  --execution-type performanceTesting \
  --wait

データシェイプ — なし --wait​

{
  "Code": "ScenarioExecute",
  "Data": {
    "ScenarioKey": "SP1:7",
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "ExecutionType": "dryRun",
    "Status": "Pending"
  }
}
{
  "Code": "ScenarioExecute",
  "Data": {
    "ScenarioKey": "SP1:7",
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "ExecutionType": "dryRun",
    "Status": "Pending"
  }
}

データシェイプ — --wait​

{
  "Code": "ScenarioExecutionResults",
  "Data": {
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "LoadGroupCount": 1,
    "LoadGroups": [
      {
        "LoadGroupId": "8e322581-0a25-0000-738b-0b49fd936ca1",
        "StartedAt": "2025-04-15T10:30:00Z",
        "CumulativeResponseTimeMs": 120,
        "MaxResponseTimeMs": 450,
        "SuccessfulWorkflowCount": 98,
        "FailedWorkflowCount": 2,
        "HttpErrorCount": 0,
        "HttpErrorRate": 0,
        "AutomationErrorCount": 2,
        "AutomationErrorRate": 0.02,
        "SloViolationReasons": []
      }
    ],
    "LogCount": 12,
    "ApplicationLogs": [
      {
        "CreatedAt": "2025-04-15T10:31:00Z",
        "LogLevel": "Information",
        "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
        "Message": "Execution finished"
      }
    ]
  }
}
{
  "Code": "ScenarioExecutionResults",
  "Data": {
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "LoadGroupCount": 1,
    "LoadGroups": [
      {
        "LoadGroupId": "8e322581-0a25-0000-738b-0b49fd936ca1",
        "StartedAt": "2025-04-15T10:30:00Z",
        "CumulativeResponseTimeMs": 120,
        "MaxResponseTimeMs": 450,
        "SuccessfulWorkflowCount": 98,
        "FailedWorkflowCount": 2,
        "HttpErrorCount": 0,
        "HttpErrorRate": 0,
        "AutomationErrorCount": 2,
        "AutomationErrorRate": 0.02,
        "SloViolationReasons": []
      }
    ],
    "LogCount": 12,
    "ApplicationLogs": [
      {
        "CreatedAt": "2025-04-15T10:31:00Z",
        "LogLevel": "Information",
        "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
        "Message": "Execution finished"
      }
    ]
  }
}

--wait は内部で results get ポーリングを行うので、これは完了した実行に対して返される results get ペイロードの形状と同じ execute --wait 、2 番目のコマンドを保存するだけです。いずれかの負荷グループに空ではない SloViolationReasons 配列がある場合、またはアプリケーション ログに「構成の実行がステータス 'failed' で終了しました」と一致すると、実行が終了ステートに達した場合でも、コマンドは 0 以外で終了します。

UIP TM のパフォーマンス シナリオ停止​

実行中のシナリオの実行をキャンセルします。

オプション​

フラグ説明
--execution-id <uuid>必須。シナリオ実行の UUID (executeの ExecutionId)。
--project-key <key>必須。所有するプロジェクト。
uip tm perf-scenario stop --execution-id 80694766-5a44-0000-0985-0b49fd93832d --project-key SP1
uip tm perf-scenario stop --execution-id 80694766-5a44-0000-0985-0b49fd93832d --project-key SP1

データシェイプ​

{
  "Code": "ScenarioStop",
  "Data": {
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "Result": "Stopping",
    "Note": "Server has accepted the cancel request. Run 'perf-scenario results get --execution-id <ID>' to confirm terminal status (will be 'Cancelled')."
  }
}
{
  "Code": "ScenarioStop",
  "Data": {
    "ExecutionId": "80694766-5a44-0000-0985-0b49fd93832d",
    "Result": "Stopping",
    "Note": "Server has accepted the cancel request. Run 'perf-scenario results get --execution-id <ID>' to confirm terminal status (will be 'Cancelled')."
  }
}

Result: "Stopping" は、サーバーがキャンセル要求を受け入れたことを反映しており、実行が実際にまだ停止したことを反映しているわけではありません。キャンセルは非同期です。

uip tm perf-scenario list-dry-run-reports​

シナリオについて、成功したドライラン レポートを一覧表示します。完全なperformanceTesting実行を送信する前にこのを実行します。完全実行するには、各負荷グループのオートメーションに対して、合格するドライラン レポートがすでに存在している必要があります。

オプション​

フラグ説明
--scenario-key <key>必須。シナリオ オブジェクト キー (例: SP1:7)。
--project-key <key>所有するプロジェクト。任意 — 省略する場合は --scenario-key のプレフィックスから派生します。
uip tm perf-scenario list-dry-run-reports --scenario-key SP1:7
uip tm perf-scenario list-dry-run-reports --scenario-key SP1:7

データシェイプ​

{
  "Code": "ScenarioDryRunReports",
  "Data": {
    "ScenarioKey": "SP1:7",
    "ScenarioId": "756e8ebf-c227-0000-8a9f-0b49fd934bef",
    "HasPassingDryRun": true,
    "ReportCount": 1,
    "Reports": [
      {
        "AutomationId": "auto-1",
        "RuntimeType": 4,
        "RecommendedMultiplexingFactor": 3,
        "ApplicationType": null
      }
    ]
  }
}
{
  "Code": "ScenarioDryRunReports",
  "Data": {
    "ScenarioKey": "SP1:7",
    "ScenarioId": "756e8ebf-c227-0000-8a9f-0b49fd934bef",
    "HasPassingDryRun": true,
    "ReportCount": 1,
    "Reports": [
      {
        "AutomationId": "auto-1",
        "RuntimeType": 4,
        "RecommendedMultiplexingFactor": 3,
        "ApplicationType": null
      }
    ]
  }
}

空の Reports 配列 (および HasPassingDryRun: false) は、負荷グループにまだドライ ランが通過していないことを意味します。最初に execute (既定の dryRun モード) を実行します。このコマンドは、シナリオに負荷グループがない場合、またはシナリオに負荷グループのテスト ケースのいずれもリンクされたオートメーションがない場合、空の結果を返すのではなくエラーが発生します。

  • 負荷グループ — テスト ケースをシナリオにバインドし、その負荷プロファイルを調整します。
  • 実行データ — 完了した実行または進行中の実行を調べます。
  • レポート — 実行または比較用に作成されたレポートを表示します。
  • テスト ケース — link-automationテスト ケースに、load-groups addとlist-dry-run-reportsが依存するautomationIdを与えるものです。
  • プロジェクト — すべてのシナリオを所有するスコープ。

参照​

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得