- 概述
- UiPath CLI
- Azure DevOps 扩展程序
- Jenkins 插件
CI/CD 集成用户指南
先决条件
- 创建多个包或测试集。
- 运行 CLI
exe(对于 Windows 旧版)或dll(对于 Windows/Linux/macOS)文件。 - 添加所需的 Orchestrator API 访问应用程序作用域。
要测试多个包,请执行以下步骤:
- 使用
uipcli test运行test任务。您可以注意可用子任务的列表。 - 指定所需的参数并运行
parallel子任务。下表介绍了必需参数:
| 参数 | 描述 |
|---|---|
Orchestrator URL (pos. 0) (必填) | Orchestrator 实例的 URL。 |
Orchestrator Tenant (pos. 1) | Orchestrator 实例的租户。 |
|
| 必填。包含测试项目配置的文件路径。 此配置概述了要打包然后使用某些执行选项并行执行的项目列表。 每个项目都可以配置以下选项:
此配置也可以采用 JSON 或 CSV 格式。 JSON 架构示例: CSV 示例: |
|
| 待测试项目根目录的路径。当testsConfigurationFile中的projectPaths相对时,为必填项。 |
|
| 要发布测试执行工件的目录路径。 |
|
| CLI 目录或uipcli.dll的路径。如果通过dotnet可执行文件执行 CLI,则为必需;在执行uipcli.exe时为可选。 |
|
| 必填。结果文件的类型 <junit|uipath>。 |
|
| 包含订阅源的 NuGet.Config 文件的路径。系统将忽略指定文件中的 |
|
| 禁用打包测试项目时使用的内置 NuGet 订阅源。 |
|
| Excludes the built-in feeds and the NuGet sources configured at the user and machine level on the host running the CLI. The CLI resolves packages only from the feeds defined in |
|
| 必填。用于身份验证的 Orchestrator 用户名。必须与密码一起使用。 |
|
| 必填。用于身份验证的 Orchestrator 密码。必须与用户名一起使用。 |
|
| 必填。用于身份验证的 Orchestrator 刷新令牌。必须与帐户名称和客户端 ID 一起使用。 |
|
| 必填。Orchestrator 组织名称。必须与刷新令牌和客户端 ID 一起使用。 |
|
| Orchestrator 组织名称。必须与外部应用程序的 ID、密码和作用域一起使用。 |
|
| 必填。外部应用程序 ID。必须与外部应用程序的组织名称、密码和作用域一起使用。 |
|
| 必填。外部应用程序密码。必须与外部应用程序的组织名称、ID 和作用域一起使用。 |
|
| 必填。以空格分隔的应用程序作用域列表。必须与外部应用程序的组织名称、ID 和密码一起使用。 |
|
| Orchestrator 文件夹名称。 |
|
| 已翻译日志的语言。 |
|
| 指定要输出的日志消息类型:下列值之一: None、Critical、Error、Warning、Information、Verbose。(默认为 Information)。 |
--identityUrl | The URL of your identity server. Required when the Orchestrator runs on UiPath Automation Suite or standalone Orchestrator (on-premises MSI). Not needed for Automation Cloud — the CLI resolves the identity server from the cloud URL. |
--ca-cert | 验证 Orchestrator 和 Identity Server TLS 证书时使用的一个或多个受信任的根 CA 证书文件(PEM、DER 或 PKCS#7)。重复标记或用逗号分隔多个路径。有关详细信息,请参阅信任自定义证书。 |
--pinnedpubkey | 固定服务器叶证书的公钥。格式: sha256//<base64> 。除标准证书验证以外进行检查。有关详细信息,请参阅信任自定义证书。 |
对于私有证书颁发机构签名的 Orchestrator 实例(例如 UiPath Automation Suite),此命令也接受--ca-cert和--pinnedpubkey参数。有关场景和示例,请参阅信任自定义证书。
用法
dotnet uipcli.dll test parallel <orchestrator_url> <orchestrator_tenant> [--testsConfigurationFilePath <tests_config_file_path>] [--projectsRootDirectoryPath <test_projects_root_directory_path>] [--executionArtifactsDirectoryPath <execution_artifacts_directory_path>] [--cliDirectoryPath <uipcli_dll_path>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --applicationScope <application_scope>] [-o <folder_name>] [-l <language>] [--out <junit|uipath>] [--disableBuiltInNugetFeeds] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>]
dotnet uipcli.dll test parallel <orchestrator_url> <orchestrator_tenant> [--testsConfigurationFilePath <tests_config_file_path>] [--projectsRootDirectoryPath <test_projects_root_directory_path>] [--executionArtifactsDirectoryPath <execution_artifacts_directory_path>] [--cliDirectoryPath <uipcli_dll_path>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --applicationScope <application_scope>] [-o <folder_name>] [-l <language>] [--out <junit|uipath>] [--disableBuiltInNugetFeeds] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>]
示例
dotnet uipcli.dll test parallel "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername" -p "********" -o "FolderName" --traceLevel Information --testsConfigurationFilePath "C:\userprofile\pipeline-repo-folder\test-configuration.json" --projectsRootDirectoryPath "C:\userprofile\test-projects-repo-folder" --executionArtifactsDirectoryPath "C:\userprofile\pipeline-execution-folder" --cliDirectoryPath "C:\userprofile\cli-download-path\UiPath.CLI.Windows\tools\uipcli.dll" --out "junit"dotnet uipcli.dll test parallel "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" --testsConfigurationFilePath "C:\userprofile\pipeline-repo-folder\test-configuration.json" --projectsRootDirectoryPath "C:\userprofile\test-projects-repo-folder" --executionArtifactsDirectoryPath "C:\userprofile\pipeline-execution-folder" --cliDirectoryPath "C:\userprofile\cli-download-path\UiPath.CLI.Windows\tools\uipcli.dll" --out "junit" "C:\userprofile\AutomationProjectWithTestCases\project.json"dotnet uipcli.dll test parallel "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 --testsConfigurationFilePath "C:\userprofile\pipeline-repo-folder\test-configuration.json" --projectsRootDirectoryPath "C:\userprofile\test-projects-repo-folder" --executionArtifactsDirectoryPath "C:\userprofile\pipeline-execution-folder" --cliDirectoryPath "C:\userprofile\cli-download-path\UiPath.CLI.Windows\tools\uipcli.dll" --out "junit"dotnet uipcli.dll test parallel "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 --testsConfigurationFilePath "C:\userprofile\pipeline-repo-folder\test-configuration.json" --projectsRootDirectoryPath "C:\userprofile\test-projects-repo-folder" --executionArtifactsDirectoryPath "C:\userprofile\pipeline-execution-folder" --cliDirectoryPath "C:\userprofile\cli-download-path\UiPath.CLI.Windows\tools\uipcli.dll" --out "junit"