- 概要
- UiPath CLI
- Azure DevOps 拡張機能
- Jenkins プラグイン

CI/CD 連携ユーザー ガイド
パッケージをテストするか、テスト セットを実行する
前提条件:
- パッケージまたはテスト セットを作成します。
- CLI
exe(Windows レガシの場合) またはdll(Windows/Linux/macOS の場合) ファイルを実行します。 - 必要な Orchestrator API アクセスのアプリケーション スコープを追加します。
パッケージをテストするには、次の手順を実行します。
uipcli testを使用して、testタスクを実行します。利用可能なサブタスクのリストが表示されます。- 必要なパラメーターを指定し、[
run] サブタスクを実行します。次の表で、必要なパラメーターについて説明します。
| パラメーター | 説明 |
|---|---|
-P , or --project-path | テストする Testing パッケージ ファイルのパスです。 |
-s , or --testset | The name shown for the Test Set you wish to execute. Ensure that the Test Set includes the most recent version of the Test Cases. If the project does not have a default folder set, make sure you assign a test folder at the Test Set level. |
--out | 結果ファイルの種類です。\<junit|uipath\>。 |
-r , or --result_path | 結果を保存するファイルの保存先パスです。 |
-e 、または --environment (クラシック フォルダーの場合は 必須 ) | パッケージをデプロイするロボット グループです。project path と組み合わせて使用する必要があります。 |
-w , or --timeout | テスト セットが実行されるまで待機する時間 (秒) です。既定値は 7200 秒です。 |
-i 、または --input_path (エントリ ポイントのワークフローに、コマンド ラインで渡す入力パラメーターがある場合は 必須 ) | JSON 入力ファイルへのフル パスです。ファイル構造について詳しくは、「 入力パラメーター JSON 形式 」をご覧ください。 |
--attachRobotLogs | 実行された各テスト ケースのロボット ログと JUnit テスト レポートを添付します。 |
|
| プロジェクトのバージョン管理が行われるリポジトリ URL です。 |
|
| プロジェクトのビルド元のリポジトリ コミット。 |
|
| プロジェクトの構築元のリポジトリブランチ。 |
|
| VCS システム リポジトリの種類。 |
|
| Automation Hub のアイデアの URL |
--releaseNotes | リリース ノートを追加する |
--nugetConfigFilePath | フィードを含む NuGet.Config ファイルへのパスです。指定したファイルの <clear /> タグは無視され、ソースのみが考慮されます。 |
--disableBuiltInNugetFeeds | 組み込みの NuGet フィードを無効化します。 |
|
| 失敗したテスト ケースのリトライ回数 (既定では、リトライは設定されていません)。 |
-u 、または --username ( 基本認証を使用する場合は必須、ユーザー名とパスワードを使用) | Orchestrator への認証に使用するユーザー名です。対応するパスワードと組み合わせて使用する必要があります。 |
-p 、または --password ( 基本認証を使用する場合は必須、ユーザー名とパスワードを使用) | Orchestrator への認証に使用するパスワードです。対応するユーザー名と組み合わせて使用する必要があります。 |
-t 、または--token ( トークンベースの認証 を使用する場合は 必須) | Orchestrator への認証に使用する OAuth2 更新トークンです。アカウント名およびクライアント ID と組み合わせて使用する必要があります。 |
-a 、または--accountName ( トークンベースの認証 を使用する場合は 必須) | Orchestrator Cloud RPA のアカウント名です。OAuth2 更新トークンおよびクライアント ID と組み合わせて使用する必要があります。 |
-A , --accountForApp | Orchestrator Cloud RPA のアカウント名 (組織名) です。外部アプリケーションのアプリケーション ID、アプリケーション シークレット、アプリケーション スコープと組み合わせて使用する必要があります。 |
-I または--applicationId ( 外部アプリケーション認証 を使用する場合は 必須 ) | 外部アプリケーション ID です。アプリケーション アカウント、アプリケーション シークレット、アプリケーション スコープと組み合わせて使用する必要があります。 |
-S または--applicationSecret ( 外部アプリケーション認証 を使用する場合は 必須 ) | 外部アプリケーション シークレットです。アプリケーション アカウント、アプリケーション ID、アプリケーション スコープと組み合わせて使用する必要があります。 |
--applicationScope ( 外部アプリケーション認証 の場合は 任意 ) | アプリケーション スコープを単一のスペースで区切って列挙したリストです。任意: 外部アプリケーション認証を既定として使用する場合は、スコープが自動的に適用されます。外部アプリケーションの アプリケーション アカウント 、 アプリケーション ID 、 アプリケーション シークレット と組み合わせて使用する必要があります。 |
-o , or --organizationUnit | テスト セットを実行する Orchestrator フォルダーです。 |
--author | パッケージの作成者 |
-l , or --language | Orchestrator のユーザー インターフェイスで使用する言語です。 |
|
| イベントのトレースを表示します。 |
--identityURL ( PaaS または MSI デプロイに必要 ) | Identity Server の URL です。 |
Orchestrator URL (pos. 0) (必須) | Orchestrator インスタンスの URL です。 |
|
| パッケージまたはテスト セットが存在するテナントです。 |
--applicationScope パラメーターを指定せずに外部アプリケーション認証を使用すると、CLI は以下の既定の Orchestrator スコープを自動的に適用します。
OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Robots.Read OR.Machines.Read OR.Jobs OR.TestSets OR.TestSetExecutions OR.Monitoring OR.Settings.Read
Test Manager の操作については、「パッケージをテストする」、または異なる既定のスコープを使用する Test Manager でテスト セットを実行する をご覧ください。
使用法:**
uipcli test run <orchestrator_url> <orchestrator_tenant> [-i <input_path>] [-P <project_json_path>] [-s <testset_name>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --applicationScope <application_scope>] [-e <environment>] [-o <folder_name>] [-l <language>] [--out <junit|uipath>] [--result_path <result_path>] [--timeout <seconds>] [--attachRobotLogs true] repositoryUrl <repository_url>] [--repositoryCommit <repository_commit>] [--repositoryBranch <repository_branch>] [--repositoryType <repository_type>] [--projectUrl <automation_hub_idea_url>] [--releaseNotes <release_notes>] [--disableBuiltInNugetFeeds] [--retryCount <number>] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>]
uipcli test run <orchestrator_url> <orchestrator_tenant> [-i <input_path>] [-P <project_json_path>] [-s <testset_name>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --applicationScope <application_scope>] [-e <environment>] [-o <folder_name>] [-l <language>] [--out <junit|uipath>] [--result_path <result_path>] [--timeout <seconds>] [--attachRobotLogs true] repositoryUrl <repository_url>] [--repositoryCommit <repository_commit>] [--repositoryBranch <repository_branch>] [--repositoryType <repository_type>] [--projectUrl <automation_hub_idea_url>] [--releaseNotes <release_notes>] [--disableBuiltInNugetFeeds] [--retryCount <number>] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>]
例:
uipcli test run "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername" -p "********" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json" "C:\userprofile\AutomationProjectWithTestCases\project.json"uipcli test run "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -I "76000552-3e4f-4590-9317-cdb420001f1d" -S '********' --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" --identityUrl "https://orch-23-10-paas.cloudapp.azure.com/identity" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json"uipcli test run "https://automation-suite.base.url.com/" "TenantName" -A "organizationName" -I "3f6239b9-e0e8-465e-a429-d9ffd1d9e57a" -S '********' --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json"uipcli test run "https://cloud.uipath.com/" "TenantName" -A "organizationName" -I "becc663c-8f1e-409a-a75f-c00330d80bc8" -S "********" --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json" --author ExampleAuthor