- 概述
- UiPath CLI
- Azure DevOps 扩展程序
- Jenkins 插件
Prerequisites:
- 创建包或测试集。
- 运行 CLI
exe(适用于 Windows)或dll(适用于 Linux)文件。 - Add the required Orchestrator API access application scopes.
要测试包,请执行以下步骤:
-
使用
uipcli test运行test任务。 您可以查看可用子任务的列表。 -
指定所需参数并运行
run子任务。请参阅下面的参数列表。
参数 描述 -P或--project-path要测试的测试包文件的路径。 -s或--testset要执行的测试集的显示名称。 确保测试集包含最新版本的测试用例。如果测试集不在默认文件夹中,请确保在其前面添加相关文件夹名称。 例如,使用“AccountingTeam\TestSet”。
--out结果文件 <junit|uipath> 的类型。 -r或--result_path要存储结果的文件的目标路径。 -e, or--environment(Required for classic folders)要部署包的环境。 您必须将其与 project path配对。-w或--timeoutThe time (in seconds) that you want to wait for the Test Set to execute. The default value is 7200 seconds. -i, or--input_path(Required if the entry-point workflow has input parameters that you want to pass through the command line)json 输入文件的完整路径。 --attachRobotLogs附加每个已执行测试用例的机器人日志和 JUnit 测试报告。 --repositoryUrl项目进行版本控制时所在的存储库 URL。
--repositoryCommit从中提交构建项目的存储库。
--repositoryBranch从中构建项目的存储库分支。
--repositoryTypeVCS 系统存储库类型。
--projectUrlAutomation Hub 概念 URL。
--releaseNotes添加发行说明。 --disableBuiltInNugetFeeds禁用内置 NuGet 订阅源。 --retryCount失败的测试用例的重试次数。
-u, or--username(Required if you use Basic Authentication, through a username and a password)用于向 Orchestrator 进行身份验证的用户名。 您必须将其与相应的密码配对。
-p, or--password(Required if you use Basic Authentication, through a username and a password)用于对 Orchestrator 进行身份验证的密码。您必须将其与相应的用户名配对。
-t, or--token(Required if you use token-based authentication)The OAuth2 refresh token used for authenticating to Orchestrator. You must pair it with the Account Name and Client ID.
-a, or--accountName(Required if you use token-based authentication)The Orchestrator CloudRPA account name. You must pair it with the OAuth2 refresh token and Client ID.
-A,--accountForAppThe Orchestrator CloudRPA account name(organization name). You must pair it with the Application ID, Application Secret, and Application scope for external application.
-I, or--applicationId(Required if you use external application authentication)The external Application ID. You must pair it with the Application Account, Application Secret, and Application scope.
-S, or--applicationSecret(Required if you use external application authentication)The external Application Secret. You must pair it with the Application Account, Application ID, and Application scope.
--applicationScope(Required if you use external application authentication)The list of application scopes, separated by single spaces. You must pair it with the Application Account, Application ID, and Application Secret for external application
-o或--organizationUnit要在其中执行测试集的 Orchestrator 文件夹。
-l或--languageOrchestrator 用户界面中使用的语言。
-y或--disableTelemetry禁用遥测数据。
--traceLevel显示事件的跟踪。
--identityURL(Required for PaaS deployments only)身份服务器的 URL。
--help显示此命令的参数和示例。
--version显示版本信息。
Orchestrator URL (pos. 0)(Required)Orchestrator 实例的 URL。 Orchestrator Tenant (pos. 1)- (Required) for SaaP deployments.
- (Optional) for PaaS deployments.
包或测试集所在的租户。
用法:
test run <orchestrator_url> <orchestrator_tenant> [-i <input_path>] [-P <package>] [-s <testset>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <account_for_app> -I <application_id> -S <application_secret> --applicationScope] [-e <environment>] [-o <folder_organization_unit>] [-l <language>]
test run <orchestrator_url> <orchestrator_tenant> [-i <input_path>] [-P <package>] [-s <testset>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <account_for_app> -I <application_id> -S <application_secret> --applicationScope] [-e <environment>] [-o <folder_organization_unit>] [-l <language>]
示例:
test run "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername" -p "********" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json"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"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"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.jsontest run "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername" -p "********" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json" --out junittest run "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername" -p "********" -o "FolderName" --traceLevel Information -P "C:\userprofile\AutomationProjectWithTestCases\project.json" --out uipath