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

CI/CD 集成用户指南

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

Testing a package or running a test set in Test Manager

先决条件
  1. Use the latest Test Manager version (Test Manager 2.2510 or higher for Automation Suite delivery or Test Manager 25.10 or higher for standalone installation).

  2. If you already have a test set running in Orchestrator, import the test set to Test Manager. For more information, refer to Test Manager - Importing Orchestrator test sets. Get the testset-key after import.

  3. Create a project in Test Manager and get the project-key. Get the project-key from Test Manager > Dashboard tab > Projects > All projects.

  4. Create a package or a test set with automated test cases. Get the testset-key from Test Manager > Test Sets tab > Key column.

  5. Get the ClientId and ClientSecret. For more information on how to get the ClientID and ClientSecret, refer to the Registering an external application section of the CI/CD integrations - Executing UiPath CLI tasks topic.

  6. Run the uipcli.dll file for Windows/Linux/macOS.

  7. Add the required Test Manager API access application scopes. For more information on the Test Manager scopes, refer to the CI/CD integrations - Executing UiPath CLI tasks topic.

Using Test Manager with CLI

To test a package using Test Manager, take the following steps: Run the test task, using uipcli test. You can notice a list of available sub-tasks. Specify the required parameters and run the run sub-task.

To use Test Manager instead of Orchestrator testing, specify the --projectKey parameter in the test run command. The CLI will automatically route your tests through Test Manager.

Test command parameters
参数描述必填
Orchestrator URL (pos. 0)The URL of the Orchestrator instance
Orchestrator Tenant (pos. 1)The tenant inside which the package, or Test Set areRequired for SaaS deployments, Optional for PaaS deployments
-P, --project-pathThe path to the Testing package file that you want to test
--projectKeyThe project key displayed in Test Manager > Dashboard tab > Projects > All projects. The project key is the prefix for all object keys.Yes (for Test Manager)
--testsetkeyThe Test Set key displayed in Test Manager Test Manager > Test Sets tab > Key column. Ensure that the Test Set includes the most recent version of the Test Cases. If the Test Set is not in the default folder, make sure to include the relevant folder name before it. For instance, use AccountingTeam\TestSet.
-s, --testsetThe 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 Test Set isn't in the default folder, make sure to include the relevant folder name before it. For instance, use AccountingTeam\TestSet
--outThe type of the result file (junit or uipath)
-r, --result_pathThe destination path of the file where you want to store the results
-e, --environmentThe environment where you want to deploy the package. You must pair it with the project pathRequired for classic folders
-w, --timeoutThe time (in seconds) that you want to wait for the Test Set to execute. The default value is 7200 seconds
-i, --input_pathThe full path to a JSON input fileRequired if the entry-point workflow has input parameters
--attachRobotLogsAttaches Robot Logs for each executed Test Case, and a JUnit Test Report
--repositoryUrlThe repository URL where the project is versioned
--repositoryCommitThe repository commit where the project was built from
--repositoryBranchThe repository branch where the project was built from
--repositoryTypeVCS system repository type
--projectUrlAutomation Hub idea URL
--releaseNotes添加发行说明
--disableBuiltInNugetFeeds禁用内置 NuGet 订阅源
--retryCountNumber of retries for failed test cases (by default, no retry is set)
-u, --usernameThe username used for authenticating to Orchestrator. You must pair it with the corresponding passwordRequired for Basic Authentication
-p, --passwordThe password used for authenticating to Orchestrator. You must pair it with the corresponding usernameRequired for Basic Authentication
-t, --tokenThe OAuth2 refresh token used for authenticating to Orchestrator. You must pair it with the Account Name and Client IDRequired for token-based authentication
-a, --accountNameThe Orchestrator CloudRPA account name. You must pair it with the OAuth2 refresh token and Client IDRequired for token-based authentication
-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, --applicationIdThe external Application ID. You must pair it with the Application Account, Application Secret, and Application scopeRequired for external application authentication
-S, --applicationSecretThe external Application Secret. You must pair it with the Application Account, Application ID, and Application scopeRequired for external application authentication
--applicationScopeThe list of application scopes, separated by single spaces. You must pair it with the Application Account, Application ID, and Application Secret for external applicationOptional for external application authentication. Using default scopes if not specified otherwise
-o, --organizationUnitThe Orchestrator folder where you want to execute the Test Sets
--authorThe package author.
-l, --languageThe language used in the Orchestrator user interface
--traceLevelDisplay the trace of the events
--identityURLThe URL of your identity serverRequired for PaaS or MSI deployments
备注:

When using external application authentication without specifying the --applicationScope parameter, the CLI automatically applies these default Test Manager scopes:

TM.Projects TM.TestSets TM.TestExecutions

In addition to default OR scopes:

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

用法示例

Execute an existing test set in Test Manager:

# Windowsuipcli test run "https://cloud.uipath.com/" "TenantName" `  --projectKey "MyTestProject" `  --testsetkey "MyTestSet" `  -A "organizationName" `  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" `  -S "********" `  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" `  -o "FolderName" `  --out "junit" `  --result_path "C:\TestResults"  --author ExampleAuthor# Linux/macOSuipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"  --author ExampleAuthor# Windowsuipcli test run "https://cloud.uipath.com/" "TenantName" `  --projectKey "MyTestProject" `  --testsetkey "MyTestSet" `  -A "organizationName" `  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" `  -S "********" `  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" `  -o "FolderName" `  --out "junit" `  --result_path "C:\TestResults"  --author ExampleAuthor# Linux/macOSuipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"  --author ExampleAuthor

Create and execute a transient test set from a project:

Transient test sets are temporary test sets created on-the-fly from your project path.

uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  -P "./MyTestProject/project.json" \  -e "TestEnvironment" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "uipath" \  --result_path "./test-results"uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  -P "./MyTestProject/project.json" \  -e "TestEnvironment" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "uipath" \  --result_path "./test-results"

Execute tests with parameter overrides:

uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -i "./test-parameters.json" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -i "./test-parameters.json" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"

Execute tests with robot logs attachment:

uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  --attachRobotLogs true \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  --attachRobotLogs true \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./test-results"
Report types

Test Manager supports two output formats:

格式描述用例
junitJUnit XML formatCI/CD integration (Jenkins, Azure DevOps, GitHub Actions)
uipathUiPath native formatDetailed execution reports with Test Manager-specific data

Migration from Orchestrator testing

Before (Orchestrator testing):

uipcli test run "https://cloud.uipath.com/" "TenantName" \  -s "MyTestSet" \  -u "username" \  -p "password" \  -o "FolderName" \  -P "./project.json"uipcli test run "https://cloud.uipath.com/" "TenantName" \  -s "MyTestSet" \  -u "username" \  -p "password" \  -o "FolderName" \  -P "./project.json"

After (Test Manager):

uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./results"uipcli test run "https://cloud.uipath.com/" "TenantName" \  --projectKey "MyTestProject" \  --testsetkey "MyTestSet" \  -A "organizationName" \  -I "becc663c-8f1e-409a-a75f-c00330d80bc8" \  -S "********" \  --applicationScope "OR.Folders OR.Execution TM.Projects TM.TestSets TM.TestExecutions" \  -o "FolderName" \  --out "junit" \  --result_path "./results"

Key differences:

  1. Add --projectKey parameter to enable Test Manager
  2. Use --testsetkey instead of -s for test set identification
  3. Test Manager requires OAuth authentication (application credentials)
  4. Specify output format with --out and destination with --result_path

最佳实践

Test Manager setup:

  • Create dedicated Test Manager projects for different applications or teams
  • Use meaningful project keys and test set keys for easy identification
  • Organize test sets by purpose (regression, smoke, integration, etc.)

Parameter management:

  • Use parameter files (-i) for environment-specific configurations
  • Store sensitive parameters in CI/CD secrets, not in parameter files
  • Document required parameters in your test set descriptions

Retry logic:

  • Use --retryCount for flaky tests that may fail intermittently
  • Set appropriate --timeout values based on test duration
  • Monitor retry patterns to identify and fix unstable tests

Reporting:

  • Use junit format for CI/CD pipeline integration
  • Use uipath format for detailed analysis in Test Manager
  • Enable --attachRobotLogs for debugging test failures

CI/CD integration:

  • Configure Test Manager authentication using secure environment variables
  • Set up automated test execution on code commits or pull requests
  • Archive test reports as build artifacts for historical tracking

此页面有帮助吗?

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