cicd-integrations
2024.10
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

CI/CD 集成用户指南

上次更新日期 2025年11月6日

测试多个包

Prerequisites:

  • 创建多个包或测试集。
  • 运行 CLI exe (适用于 Windows)或dll (适用于 Linux)文件。
  • 添加所需的 Orchestrator API 访问应用程序作用域

要测试多个包,请执行以下步骤:

  1. 使用uipcli test运行test任务。您可以注意可用子任务的列表。
  2. 指定所需的参数并运行parallel子任务。下表介绍了必需参数:

参数

描述

--testsConfigurationFilePath

必填。包含测试项目配置的文件路径。

此配置概述了要打包然后使用某些执行选项并行执行的项目列表。

每个项目都可以配置以下选项:

  • ProjectPath :运行任务的智能体上的项目路径。这可以是相对路径或绝对路径。
  • AttachRobotLogs :如果设置为true ,则机器人日志将包含在测试报告文件中。
  • ContinueOnError :确定在关联的测试失败时,管道任务是否应失败。
  • RetryCount :每个测试项目的重试次数。
  • Timeout :每个测试项目的超时时间,以秒为单位(默认值为 7200)。
  • ParametersFilePath :包含测试输入参数的 JSON 文件的路径。这类似于用于 UiPathTest 任务的参数文件。
  • 测试包元数据:

    • ReleaseNotes

    • RepositoryUrl

    • RepositoryCommit

    • RepositoryBranch

    • RepositoryType

    • ProjectUrl

此配置也可以采用 JSON 或 CSV 格式。

JSON 架构示例:

[
{
"ProjectPath": "path/to/project",
"AttachRobotLogs": true,
"ContinueOnError": false,
"RetryCount": 3,
"Timeout": 7200,
"ParametersFilePath": "path/to/parameters.json",
"ReleaseNotes": "release notes for the test project",
"RepositoryUrl": "http://repositoryurl.com",
"RepositoryCommit": "commit hash",
"RepositoryBranch": "branch name",
"RepositoryType": "git",
"ProjectUrl": "http://projecturl.com"
},
{
"ProjectPath": "path/to/project2"
},
{
"ProjectPath": "path/to/project3",
"ParametersFilePath": "path/to/parameters3.json"
}
][
{
"ProjectPath": "path/to/project",
"AttachRobotLogs": true,
"ContinueOnError": false,
"RetryCount": 3,
"Timeout": 7200,
"ParametersFilePath": "path/to/parameters.json",
"ReleaseNotes": "release notes for the test project",
"RepositoryUrl": "http://repositoryurl.com",
"RepositoryCommit": "commit hash",
"RepositoryBranch": "branch name",
"RepositoryType": "git",
"ProjectUrl": "http://projecturl.com"
},
{
"ProjectPath": "path/to/project2"
},
{
"ProjectPath": "path/to/project3",
"ParametersFilePath": "path/to/parameters3.json"
}
]

CSV 示例:

ProjectPath,AttachRobotLogs,ContinueOnError,RetryCount,Timeout,ParametersFilePath,ReleaseNotes,RepositoryUrl,RepositoryCommit,RepositoryBranch,RepositoryType,ProjectUrl
path/to/project,true,false,3,7200,path/to/parameters.json,release notes for the test project,http://repositoryurl.com,commit hash,branch name,git,http://projecturl.com
path/to/project2,,,,,,,,,,,
path/to/project3,,,,,path/to/parameters3.json,,,,,,ProjectPath,AttachRobotLogs,ContinueOnError,RetryCount,Timeout,ParametersFilePath,ReleaseNotes,RepositoryUrl,RepositoryCommit,RepositoryBranch,RepositoryType,ProjectUrl
path/to/project,true,false,3,7200,path/to/parameters.json,release notes for the test project,http://repositoryurl.com,commit hash,branch name,git,http://projecturl.com
path/to/project2,,,,,,,,,,,
path/to/project3,,,,,path/to/parameters3.json,,,,,,

--projectsRootDirectoryPath

待测试项目根目录的路径。当testsConfigurationFile中的projectPaths相对时,为必填项。

--executionartifactsdirectorypath

要发布测试执行工件的目录路径。

--cliDirectoryPath

CLI 目录或uipcli.dll的路径。如果通过dotnet可执行文件执行 CLI,则为必需;在执行uipcli.exe时为可选。

--out

必填。结果文件的类型 <junit|uipath>。

--disableBuiltInNugetFeeds

禁用打包测试项目时使用的内置 NuGet 订阅源。

-u, --username

必填。用于身份验证的 Orchestrator 用户名。必须与密码一起使用。

-p, --password

必填。用于身份验证的 Orchestrator 密码。必须与用户名一起使用。

-t, --token

必填。用于身份验证的 Orchestrator 刷新令牌。必须与帐户名称和客户端 ID 一起使用。

-a, --accountName

必填。Orchestrator 组织名称。必须与刷新令牌和客户端 ID 一起使用。

-A, --accountForApp

Orchestrator 组织名称。必须与外部应用程序的 ID、密码和作用域一起使用。

-I, --applicationId

必填。外部应用程序 ID。必须与外部应用程序的组织名称、密码和作用域一起使用。

-S, --applicationSecret

必填。外部应用程序密码。必须与外部应用程序的组织名称、ID 和作用域一起使用。

--applicationScope

必填。以空格分隔的应用程序作用域列表。必须与外部应用程序的组织名称、ID 和密码一起使用。

-o, --organizationUnit

Orchestrator 文件夹名称。

-l, --language

已翻译日志的语言。

--traceLevel

指定要输出的日志消息类型:下列值之一: None、Critical、Error、Warning、Information、Verbose。(默认为 Information)。

--identityUrl (对于PaaSMSI部署为必需

身份服务器的 URL。

Orchestrator URL ( Pos。0)

必填。 Orchestrator 实例的 URL。

Orchestrator Tenant (第 1 项)

Orchestrator 实例的租户。

用法:

./uipcli.exe 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>]./uipcli.exe 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>]

示例:

  • ./uipcli.exe 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"
  • ./uipcli.exe 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"
  • ./uipcli.exe 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"
  • ./uipcli.exe 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"

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。