# Testing a package or running a test set

> * Create a package or a test set.
* Run the CLI `exe` (for Windows Legacy) or `dll` (for Windows/Linux/macOS) file.
* Add the required Orchestrator [API access application scopes](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/executing-uipath-cli-tasks).

## Prerequisites

* Create a package or a test set.
* Run the CLI `exe` (for Windows Legacy) or `dll` (for Windows/Linux/macOS) file.
* Add the required Orchestrator [API access application scopes](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/executing-uipath-cli-tasks).

To test a package, take the following steps:

1. Run the `test` task, using `uipcli test`. You can notice a list of the available sub-tasks.
2. Specify the required parameters and run the `run` sub-task.
   The following table describes the required parameters:

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Parameter  
     Description  
  
 
 
  
    <code>Orchestrator URL (pos. 0)</code> ( Required ) 
    The URL of the Orchestrator instance. 
  
  
    <code>Orchestrator Tenant (pos. 1)</code> 
    The tenant inside which the package, or Test Set are. Required when targeting Automation Cloud. Optional for Automation Suite and standalone Orchestrator (on-premises MSI), where the tenant is part of the URL. 
  
  
    <code>-P</code> , or <code>--project-path</code> 
    The path to the Testing package file that you want to test. 
  
  
    <code>-s</code> , or <code>--testset</code> 
     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.  
  
  
    <code>--out</code> 
    The type of the result file \&lt;junit|uipath\&gt;. 
  
  
    <code>-r</code> , or <code>--result_path</code> 
    The destination path of the file where you want to store the results. 
  
  
    <code>-e</code> , or <code>--environment</code> ( Required for classic folders) 
    The environment where you want to deploy the package. You must pair it with the <code>project path</code> . 
  
  
    <code>-w</code> , or <code>--timeout</code> 
    The time (in seconds) that you want to wait for the Test Set to execute. The default value is 7200 seconds . 
  
  
    <code>-i</code> , or <code>--input_path</code> ( Required if the entry-point workflow has input parameters that you want to pass through the command line) 
    The full path to a JSON input file. See Input Parameters JSON Format for details on the file structure. 
  
  
    <code>--attachRobotLogs</code> 
    Attaches Robot Logs for each executed Test Case, and a JUnit Test Report. 
  
  
    <code>--repositoryUrl</code> 
     The repository URL where the project is versioned.  
  
  
    <code>--repositoryCommit</code> 
     The repository commit where the project was built from.  
  
  
    <code>--repositoryBranch</code> 
     The repository branch where the project was built from.  
  
  
    <code>--repositoryType</code> 
     VCS system repository type.  
  
  
    <code>--projectUrl</code> 
     Automation Hub idea URL.  
  
  
    <code>--releaseNotes</code> 
    Add release notes. 
  
  
    <code>--author</code> 
    The package author. 
  
  
    <code>--nugetConfigFilePath</code> 
    Path to the NuGet.Config file containing feeds. The <code>&lt;clear /&gt;</code> tag from the specified file will be ignored and only sources will be taken into consideration. 
  
  
    <code>--disableBuiltInNugetFeeds</code> 
    Disable built-in nuget feeds. 
  
  
    <code>--excludeConfiguredSources</code> 
    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 <code>--nugetConfigFilePath</code>. See Managing NuGet feeds. 
  
  
    <code>--retryCount</code> 
     Number of retries for failed test cases (by default, no retry is set).  
  
  
    <style> .css-17xdpgx\{word-break:break-word;\}.css-17xdpgx div\{padding-left:10px;\}.css-17xdpgx code\{font-size:16px;\}.css-17xdpgx img\{margin-bottom:-5px;\} </style><code>-u</code> , or <code>--username</code> ( Required if you use Basic Authentication , through a username and a password) 
     The username used for authenticating to Orchestrator. You must pair it with the corresponding password.  
  
  
    <code>-p</code> , or <code>--password</code> ( Required if you use Basic Authentication , through a username and a password) 
     The password used for authenticating to Orchestrator. You must pair it with the corresponding username.  
  
  
    <code>-t</code> , or <code>--token</code> ( 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 .  
  
  
    <code>-a</code> , or <code>--accountName</code> ( Required if you use  token-based authentication  ) 
     The Orchestrator CloudRPA account name. You must pair it with the OAuth2 refresh token and Client ID .  
  
  
    <code>-A</code> , <code>--accountForApp</code> 
     The Orchestrator CloudRPA account name(organization name). You must pair it with the Application ID , Application Secret , and Application scope for external application.  
  
  
    <code>-I</code> , or <code>--applicationId</code> ( Required if you use  external application authentication  ) 
     The external Application ID. You must pair it with the Application Account , Application Secret , and Application scope .  
  
  
    <code>-S</code> , or <code>--applicationSecret</code> ( Required if you use  external application authentication  ) 
     The external Application Secret. You must pair it with the Application Account , Application ID , and Application scope .  
  
  
    <code>--applicationScope</code> ( Optional for  external application authentication  ) 
     The list of application scopes, separated by single spaces. Optional when using external application authentication as default scopes are automatically applied. You must pair it with the Application Account , Application ID , and Application Secret for external application  
  
  
    <code>-o</code> , or <code>--organizationUnit</code> 
     The Orchestrator folder where you want to execute the Test Sets.  
  
  
    <code>-l</code> , or <code>--language</code> 
     The language used in the Orchestrator user interface.  
  
  
    <code>--traceLevel</code> 
     Display the trace of the events.  
  
  
    <code>--identityUrl</code> 
     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.  
  
  
   <code>--ca-cert</code>
   One or more trusted root CA certificate files (PEM, DER, or PKCS#7) used when validating the Orchestrator and Identity Server TLS certificates. Repeat the flag or comma-separate multiple paths. See Trusting custom certificates for details.
  
  
   <code>--pinnedpubkey</code>
   Pin the server leaf certificate's public key. Format: <code>sha256//&lt;base64&gt;</code>. Checked in addition to standard certificate validation. See Trusting custom certificates for details.
  
 

:::tip Trusting custom certificates
For Orchestrator instances signed by a private Certificate Authority (such as UiPath Automation Suite), this command also accepts `--ca-cert` and `--pinnedpubkey` parameters. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates) for scenarios and examples.
:::

:::note **Default Application Scopes for Testing**
When using external application authentication without specifying the `--applicationScope` parameter, the CLI automatically applies these default Orchestrator 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`

For Test Manager operations, see [Testing a package or running a test set in Test Manager](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/testing-a-packagerunning-a-test-set-in-test-manager) which uses different default scopes.
:::

**Usage:****

```
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>]
```

## Examples

* `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`
