- Getting Started with Test Suite
- Studio
- Orchestrator
- Testing robots
- Test Manager
- CI/CD integrations
Test Suite User Guide
Jobs
You can use the UiPathInstallPlatform task when:
- You want to download a different version of the CLI, so you can, for example, pack Windows and Cross-platform projects.
-
The build agents don't have access to the UiPath NuGet Feed.
You should execute the UiPathInstallPlatform task before any other tasks in the plugin. The UiPath InstallPlatform task downloads the CLI from the NuGet Public Feed only if the compatible version isn't available in the cache.
Select the version of the CLI that you want to use with your Azure DevOps Extension, from the Choose a CLI version dropdown.
The options in the dropdown list include:
- The latest available versions of the CLI.
- The environment requirements that
you need to be compatible with the CLI version that you choose.
If your pipeline fails to access the UiPath Public Feed and can't download the CLI version that you chose from the dropdown list, follow the steps below:
- Download the desired CLI version from the UiPath Public Feed.
-
Place the downloaded NUPKG file inside the agent workspace directory of your build agent. Remember the path of the NUPKG file inside the agent workspace directory. For example,
${WORKSPACE}\nupkg\UiPath.CLI.xx.xx.xx.nupkg
Use the InstallPlatform task, and input the path used at step 2 inside the Path to CLI's nupkg field.
The UiPath Run Job post-build step starts a process that was already deployed on an Orchestrator instance. In Orchestrator version 2020.10, you can find the processes that are run by this task in the Processes tab. In versions of Orchestrator 2021.10, and higher, you can find the processes that are run by this task in Automations, under Processes.
Job parameter |
Description |
---|---|
Process (Required) |
Process name. You can take the process name from the Orchestrator UI. If the process is deployed in a Modern folder then this argument should be the Name of the process in the Processes tab. If the process is deployed in a Classic folder, then the argument must be formed by the Name of the process and the Environment (for example:
NAME: ProcessA ENVIRONMENT: Production ProcessName: ProcessA_Production ).
|
Parameters |
The full path to a JSON input file. This is used when the Process requires input. JSON file format example:
|
Priority |
The job run priority. |
Strategy |
Specify the job run strategy, dynamically allocated job(s) or robot-specific job(s). Choose one of the following options:
|
Job Type (available for Modern folders only) |
Choose the license model of the runtime under which the job is to be executed. |
Orchestrator address |
The address of the Orchestrator instance where you'll run the process. |
Orchestrator tenant |
Specify the Orchestrator tenant. |
Orchestrator folder | Specify the folder where the specified process was deployed.
To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use
AccountingTeam\TeamJohn .
|
Authentication |
For authentication towards Orchestrator, you need to create credentials in Jenkins upfront. There are four options to authenticate: (1) Authenticate to an on-premise Orchestrator using username and password. (2) Authenticate to a cloud Orchestrator using a refresh token (API key). (3) Authenticate to a cloud Orchestrator using external app authentication. (4) Authenticate to a on-premise Orchestrator using external app authentication. |
Job results output path |
Specify the output path of the job results (for example,
testResults.json ). The results are outputted in JSON format.
If not specified, the results are outputted to the artifact staging directory as
UiPathResults.json . The output is in JSON format.
|
Timeout |
Specify the job run(s) timeout in seconds. |
Fail when job fails |
The task fails when at least one job fails. The default value is True. |
Wait for job completion |
Wait for job run(s) completion. The default value is True. |
Trace logging level |
Setting used to enable trace logging to one of the following levels:
|
No. of jobs |
The number of job runs. The default value is 1. |
User (available for Modern folders only) |
The name of the user. This should be a machine user, not an Orchestrator user. For local users, the format should be MachineName\UserName. |
Machine (available for Modern folders only) |
The name of the machine. |
Robot names |
Comma-separated list of specific robot names. |
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
UiPathRunJob(
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
failWhenJobFails: true,
folderName: 'A_Classic',
orchestratorAddress: 'https://testorchestrator.some-domain.com',
orchestratorTenant: 'Default',
parametersFilePath: '',
priority: 'Low',
processName: 'ProcessA_EnvB',
resultFilePath: 'output.json',
strategy: Dynamically(jobsCount: 1, machine: 'TestMachine', user: 'TestUser'), timeout: 3600, waitForJobCompletion: true, traceLoggingLevel: 'None'
)
UiPathRunJob(
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
failWhenJobFails: true,
folderName: 'A_Classic',
orchestratorAddress: 'https://testorchestrator.some-domain.com',
orchestratorTenant: 'Default',
parametersFilePath: '',
priority: 'Low',
processName: 'ProcessA_EnvB',
resultFilePath: 'output.json',
strategy: Robot('robot1,robot2'),
timeout: 1800,
waitForJobCompletion: false,
traceLoggingLevel: 'None'
)
}
}
}
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
UiPathRunJob(
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
failWhenJobFails: true,
folderName: 'A_Classic',
orchestratorAddress: 'https://testorchestrator.some-domain.com',
orchestratorTenant: 'Default',
parametersFilePath: '',
priority: 'Low',
processName: 'ProcessA_EnvB',
resultFilePath: 'output.json',
strategy: Dynamically(jobsCount: 1, machine: 'TestMachine', user: 'TestUser'), timeout: 3600, waitForJobCompletion: true, traceLoggingLevel: 'None'
)
UiPathRunJob(
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
failWhenJobFails: true,
folderName: 'A_Classic',
orchestratorAddress: 'https://testorchestrator.some-domain.com',
orchestratorTenant: 'Default',
parametersFilePath: '',
priority: 'Low',
processName: 'ProcessA_EnvB',
resultFilePath: 'output.json',
strategy: Robot('robot1,robot2'),
timeout: 1800,
waitForJobCompletion: false,
traceLoggingLevel: 'None'
)
}
}
}
To configure the Run Job task, input a JSON file that contains the parameters required for running the process in Orchestrator. Orchestrator validates only primitive values. Below is an overview of the required formats for input parameters that can be passed to Orchestrator:
Parameter | Required format | Example |
---|---|---|
String | Enclose the value in quotation marks. | 'string value' |
Int32 | Provide the value as you would for any integer. | 11 |
Boolean | Provide the value as either true or false .
| true |
Double | Provide a floating point value. | 3.5 |
DateTime | Provide a valid JSON representation. | "2012-04-23T18:25:43.511Z" |
Array | Provide values as valid JSON. | [1,1,2,3,5,8] or ["firstString", "secondString"] |
Example JSON schema
Below is an example JSON schema showing how to input the required parameters in a JSON file. Ensure that the arguments passed in the JSON file exist in the Studio project used for publishing the process to Orchestrator.
{
'in_JenkinsBaseUrl': 'http://localhost:8080/jenkins/',
'in_JenkinsBuildName': '02_UiPathApplicationDemo'
}
{
'in_JenkinsBaseUrl': 'http://localhost:8080/jenkins/',
'in_JenkinsBuildName': '02_UiPathApplicationDemo'
}
uft-8
.
name,type,value,description
asset_1_name,text,asset_value,this is an test description # we can have comments
asset_2_name,integer,123
asset_3_name,boolean,false
asset_4_name,credential,"username::password"
name,type,value,description
asset_1_name,text,asset_value,this is an test description # we can have comments
asset_2_name,integer,123
asset_3_name,boolean,false
asset_4_name,credential,"username::password"
There are four types of assets:
- Text
- Integer
- Boolean
-
Credential. For the Credential you must encode the username and password by using
::
to separate the two fields.
Job parameter |
Description |
---|---|
Action |
What to do with the provided assets: deploy or delete. If a deployed asset exists then it will be updated instead. |
Orchestrator address |
The address of the Orchestrator instance where you'll deploy or update assets. |
Orchestrator tenant |
Specify the Orchestrator tenant onto which the assets will be deployed or updated. |
Orchestrator folder |
Specify the folder where assets will be deployed or updated. To input subfolders make sure to input both the parent folder
name and the name of the subfolder. For instance, use
AccountingTeam\TeamJohn .
|
Authentication |
For authentication towards Orchestrator, you need to create credentials in Jenkins upfront. There are four options to authenticate: (1) Authenticate to an on-premise Orchestrator using username and password. (2) Authenticate to a cloud Orchestrator using a refresh token (API key). (3) Authenticate to a cloud Orchestrator using external app authentication. (4) Authenticate to an on-premise Orchestrator using external app authentication. |
CSV File Path |
The path to the CSV file containing the asset details. The same file can be used to deploy or update the assets, although the type isn't required for updates. The
type field can also be empty, but the column must be present. For delete, only the name column is used, so the other columns can be empty, but they must be present.
You can set an optional description for each asset (for example:
type , value , description ). Make sure to remove any line breaks as each line is interpreted as a new asset.
|
Trace logging level |
Setting used to enable trace logging to one of the following levels:
|
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
UiPathAssets (
assetsAction: DeployAssets(),
credentials: Token(accountName: '', credentialsId: ''),
filePath: '${WORKSPACE}/test.csv',
folderName: 'Default',
orchestratorAddress: 'https://test-orchestrator.somedomain.com',
orchestratorTenant: 'Default',
traceLoggingLevel: 'None'
)
UiPathAssets(
assetsAction: DeleteAssets(),
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
filePath: '${WORKSPACE}/test.csv',
folderName: 'Default',
orchestratorAddress: 'https://test-orchestrator.somedomain.com',
orchestratorTenant: 'Default',
traceLoggingLevel: 'None'
)
}
}
}
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
UiPathAssets (
assetsAction: DeployAssets(),
credentials: Token(accountName: '', credentialsId: ''),
filePath: '${WORKSPACE}/test.csv',
folderName: 'Default',
orchestratorAddress: 'https://test-orchestrator.somedomain.com',
orchestratorTenant: 'Default',
traceLoggingLevel: 'None'
)
UiPathAssets(
assetsAction: DeleteAssets(),
credentials: UserPass('825c83c9-9a14-44eb-883a-af54f8078af0'),
filePath: '${WORKSPACE}/test.csv',
folderName: 'Default',
orchestratorAddress: 'https://test-orchestrator.somedomain.com',
orchestratorTenant: 'Default',
traceLoggingLevel: 'None'
)
}
}
}
Application: RPA
Type: Build task
UiPath Pack is available in standard jobs and pipelines, and lets you package an existing UiPath project into a NuGet package.
Job parameter |
Description |
---|---|
Choose versioning method |
UiPath packages are versioned. With UiPath pack you can choose between 3 different options: (1) Auto generate (2) Define custom version (3) Use the current version set in the project. |
Project(s) path |
The location of the project(s) to be packaged. It can be a direct path to a
project.json file or a directory with one or more projects. In the latter case, each level one project is packaged individually.
|
Output folder |
Path to a folder where you want to create the package. |
Output type |
The output type of the project(s). There are 5 options for the project(s) type: (1) Output type of the project (2) Pack a process project (3) Pack a library project (4) Pack a tests project (5) Pack an objects project. |
Run workflow analysis |
Run the workflow analysis before packing, checking the project via predefined rules for violations. Fail the job in case of errors. By default, the analysis is not run. |
Trace logging level |
Setting used to enable trace logging to one of the following levels:
|
Use orchestrator |
Use Orchestrator feed when packaging libraries. The Orchestrator must be 20.4 or higher. The library feed needs to allow API Key authentication in Tenant > Setting > Deployment. |
Orchestrator address |
The address of the Orchestrator instance from which library dependencies should be restored. |
Orchestrator tenant |
The Orchestrator tenant from which library dependencies should be restored. |
Authentication |
For authentication towards Orchestrator, you need to create credentials in Jenkins upfront. There are four options to authenticate: (1) Authenticate to an on-premise Orchestrator using username and password. (2) Authenticate to a cloud Orchestrator using a refresh token (API key). (3) Authenticate to a cloud Orchestrator using external app authentication. (4) Authenticate to an on-premise Orchestrator using external app authentication. |
ipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
steps {
UiPathPack (
outputPath: "Output\)\)\)\)${env.BUILD_NUMBER}",
projectJsonPath: "UiBank\)\)\)\)project.json",
version: [$class: 'ManualVersionEntry', version: "${MAJOR}.${MINOR}.${env.BUILD_NUMBER}"]
useOrchestrator: true,
traceLoggingLevel: "None",
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: “credentialsId”]
)
}
}
}
}
ipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('Build') {
steps {
UiPathPack (
outputPath: "Output\)\)\)\)${env.BUILD_NUMBER}",
projectJsonPath: "UiBank\)\)\)\)project.json",
version: [$class: 'ManualVersionEntry', version: "${MAJOR}.${MINOR}.${env.BUILD_NUMBER}"]
useOrchestrator: true,
traceLoggingLevel: "None",
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: “credentialsId”]
)
}
}
}
}
Application: RPA
Type: Post-Build task
UiPath Deploy is available in standard jobs and pipelines, and lets you deploy a UiPath NuGet package onto UiPath Orchestrator.
Job parameter |
Description |
---|---|
Package(s) path |
The folder that holds your UiPath nuget package(s). |
Orchestrator address |
The address of the Orchestrator instance onto which the package(s) will be deployed. |
Orchestrator tenant |
The Orchestrator tenant onto which the package(s) will be deployed. |
Orchestrator folder |
The folder to deploy to. If the folder is a Classic folder, you'll also need to set the
environments field. For Modern folders, setting the
environments field is not required.
To input subfolders make sure to input both the parent folder name and the name
of the subfolder. For instance, use
AccountingTeam\TeamJohn .
|
Environments (Required for Classic folders) |
The environment onto which the package will be deployed as a process. For the project and environment with existing processes, the processes will be updated to use the latest project version. Specify the environment onto which the package will be deployed as a process. For the project and environment with existing processes, the processes will be updated to use the latest project version. |
Entry Points |
Specify entry points to create or update a process. The entry point specifies the filePath starting from the root of the project. Conditions:
|
Authentication |
For authentication towards Orchestrator, you need to create credentials in Jenkins upfront. There are four options to authenticate: (1) Authenticate to an on-premise Orchestrator using username and password. (2) Authenticate to a cloud Orchestrator using a refresh token (API key). (3) Authenticate to a cloud Orchestrator using external app authentication. (4) Authenticate to an on-premise Orchestrator using external app authentication. |
Trace logging level |
Setting used to enable trace logging to one of the following levels:
|
Make sure that your network allows access to the following NuGet package feed:
- https://api.nuget.org/v3/index.json
- https://uipath.pkgs.visualstudio.com/_packaging/nuget-packages/nuget/v3/index.json
- https://uipath.pkgs.visualstudio.com/Public.Feeds/_packaging/UiPath-* Internal/nuget/v3/index.json
- https://www.myget.org/F/workflow
- http://www.myget.org/F/uipath
- https://www.myget.org/F/uipath-dev/api/v3/index.json
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('PostBuild') {
steps {
UiPathDeploy (
packagePath: "path\)\)\) o\)\)NuGetpackage",
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
folderName: "folder name",
environments: "environment",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: “credentialsId”],
traceLoggingLevel: 'None'
)
}
}
}
}
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('PostBuild') {
steps {
UiPathDeploy (
packagePath: "path\)\)\) o\)\)NuGetpackage",
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
folderName: "folder name",
environments: "environment",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: “credentialsId”],
traceLoggingLevel: 'None'
)
}
}
}
}
Application: Testing
Type: Post-Build task
UiPath Run tests is available in standard jobs and pipelines, and lets you:
- Run an existing Test Set in Orchestrator.
- Package, deploy and run test cases, by specifying the path to a UiPath test project.
After the test run has finished, the Test Result tab is published to the Jenkins build, showing the detailed results. Additionally, a JUnit test results file is created to the test result output path, when specified, or to the workspace root if not specified.
Depending on the result, the build is either marked as successful (all test cases are passed), or unstable (at least one test case failed).
Job parameter |
Description |
---|---|
Target |
|
Test result output path |
The executed test set returns the test result as
junit.xml . Specify the path where the result should be stored, relative to the Jenkins workspace directory (for example, result.xml ).
|
Input Parameters |
Define custom arguments for your test cases to override default values at the test set level. Through the arguments, you can set parameters to test cases at runtime. To define arguments, you need to publish a package with arguments. |
Orchestrator address |
The address of the Orchestrator instance onto which the package(s) will be deployed. |
Orchestrator tenant |
The Orchestrator tenant onto which the package(s) will be deployed. |
Orchestrator folder |
The folder to deploy to. If the folder is a Classic folder, you will also need to set the
environments field.
For Modern folders, setting the
environments . is not required.
To input subfolders make sure to input both the parent folder name and the name
of the subfolder. For instance, use
AccountingTeam\TeamJohn .
|
Environments (Required for Classic folders) |
The environment onto which the package will be deployed as a process. For the project and environment with existing processes, the processes will be updated to use the latest project version. Specify the environment onto which the package will be deployed as a process. For the project and environment with existing processes, the processes will be updated to use the latest project version. |
Authentication |
For authentication towards Orchestrator, you need to create credentials in Jenkins upfront. There are four options to authenticate: (1) Authenticate to an on-premise Orchestrator using username and password. (2) Authenticate to a cloud Orchestrator using a refresh token (API key). (3) Authenticate to a cloud Orchestrator using external app authentication. (4) Authenticate to an on-premise Orchestrator using external app authentication. |
Timeout (seconds) |
The execution timeout for the test run. The default value is 7200 seconds. If the timeout exceeds before the execution on Orchestrator is finished and returns the result, the built will cancel and be marked as failed. |
Trace logging level |
Setting used to enable trace logging to one of the following levels:
|
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('PostBuild') {
steps {
UiPathTest (
testTarget: [$class: 'TestSetEntry', testSet: "My Test Set"],
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
folderName: "folder name",
timeout: "10000",
traceLoggingLevel: 'None',
testResultsOutputPath: "result.xml",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: "credentialsId"]
)
}
}
}
}
pipeline {
agent any
environment {
MAJOR = '1'
MINOR = '0'
}
stages {
stage ('PostBuild') {
steps {
UiPathTest (
testTarget: [$class: 'TestSetEntry', testSet: "My Test Set"],
orchestratorAddress: "OrchestratorUrl",
orchestratorTenant: "tenant name",
folderName: "folder name",
timeout: "10000",
traceLoggingLevel: 'None',
testResultsOutputPath: "result.xml",
credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: "credentialsId"]
)
}
}
}
}