test-suite
2022.4
false
UiPath logo, featuring letters U and I in white
Test Suite User Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Aug 13, 2024

Job Tasks

Overview

Your pipeline is composed of different stages, that in turn, can be broken down into jobs. For each job, you can configure the steps to include the UiPath tasks, included with the UiPath Integration for Azure DevOps.

Important: Starting with April 2023, and 2023.4, new executions will be blocked in classic folders. For tasks that include a classic folder in their configuration, a Folder not found message is displayed, and the task is not performed. Learn more about classic folder removal here.

Prerequisites

To prepare your environment, see Azure DevOps extension prerequisites.

Considerations

Before you start executing tasks in your pipeline, consider the following:

  • You need to execute UiPath tasks only on Windows-based build agents.
  • Configure UiPath Orchestrator service connection.
  • Testing features requires Orchestrator version 2020.4 or higher.
  • If you use an on-premises version of Orchestrator with HTTPS, import the SSL certificate to make sure that HTTPS calls to Orchestrator are trusted.

Command-Line interface

The Azure DevOps Extension comes with a built-in CLI (Command-Line interface ) that is specific to UiPath.

Caching the CLI

When you run over the build agent, the CLI communicates with Orchestrator and allows you to execute your job tasks.

By default, the CLI is prepackaged within the AzureDevOps extension, and it is stored inside the Agent.ToolsDirectory (Azure cache) when executing it for the first time.
When running a job task over the build agent, the system checks for the CLI that should be inside the Agent.ToolsDirectory, in order to finish the execution.
If the CLI is not found inside the Agent.ToolsDirectory (Azure cache), the system automatically downloads it from the NuGet public feed. A requirement for this is that the NuGet public feed is not blocked by a firewall, and can be accessed from your build agent.
If you are not able to open up your firewall from your build agent, you can manually download the CLI (corresponding to the build version used for your current plugin), and manually place it inside the Agent.ToolsDirectory, using the Install Platform task.

Adding UiPath tasks to pipeline agent pool

To define an automation procedure in your pipeline, you need to add and configure individual tasks to the agent pool.

  1. In Azure DevOps and go to Pipelines.
  2. Create a new pipeline or edit an existing one.
  3. Add a job to the agent pool.
  4. Search for one of the following tasks:
    1. UiPath Run Job
    2. UiPath Manage Assets
    3. UiPath Install Platform
    4. UiPath Pack
    5. UiPath Deploy
    6. UiPath Test
  5. Click Add and configure the task.
  6. Rearrange the tasks in the agent pool if needed and then save your pipeline.
docs image

UiPath Run Job

You can use this task to execute a process that's been already deployed on an Orchestrator instance. For more information, see Processes and Jobs.

Configuration

Use the following table to configure the UiPath Run Job inputs.

InputDescription
Display name (Required) Enter a name for your task.
Orchestrator connection (Required) Configure the service connection to access UiPath Orchestrator services. You can configure a connection only for this step or use an existing global connection. For more information, see Configuring UiPath Orchestrator service connection.
Process (Required) The process is the package version that is linked to a particular folder type. You need to configure this input based on the type of folder on which the process is deployed.For modern folders, the input is the name of the process that's listed in the Processes tab. To find out the process name, you can open Orchestrator, open your folder, and navigate to Automations > Processes.For classic folders (deprecated), the input is the name of the process name, followed by and underscore, and then the environment name, where the Robots are hosted.As an example for this naming convention, consider the following variables: The name of the process isTestAutomation. The name of the environment is Production.Your process name for this input is TestAutomation_Production.
Input parametersSpecify the file path to a JSON input file, such as Input\jobParameters.json.

JSON file format example:

{
  "StringArgument_In": "MyConfigurationValue",
  "IntArgument_In": 1,
  "DictionaryArgument_In": {
    "Key1": "Value1",
    "Key2": "Value2"
  }
}{
  "StringArgument_In": "MyConfigurationValue",
  "IntArgument_In": 1,
  "DictionaryArgument_In": {
    "Key1": "Value1",
    "Key2": "Value2"
  }
}
PrioritySelect the priority of the job execution if you want to set a specific order at the process level. By default, this input is set to Normal.
Orchestrator folder (Required) Specify the folder where the process is being deployed. For classic folders, you can use specific robot names. For modern folders, you can use specific user and machine names.

To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use AccountingTeam\TeamJohn.

StrategySpecify the execution strategy for dynamic allocation or robot-specific. For dynamically allocated jobs, the process is executed under the account and machine that is available. Alternatively, you can choose robot-specific jobs.
Job Type Available only on modern folders.Choose the license model of the runtime under which the job is to be executed. For more information, see Robot licensing.
No. of jobs Available only for dynamic allocation strategy.Specify the number of times you want to run this task. By default, this input is set to 1.
User Available only on modern folders alongside a dynamic allocation strategy.Add the machine username. For example, a local user for this input is MachineName\UserName.
Machine Available only on modern folders alongside a dynamic allocation strategy.The name of the machine that runs the execution.
OutputThe results are collected in a JSON file. You need to specify the path of the job results (e.g., Output\testResults.json). If you leave this input blank, the default output is sent to the artifact staging directory under the following name UiPathResults.json.
TimeoutSpecify the number of seconds to wait before the request times out.
Fail task when job failsSelect this input if you want to set the task as failed when at least one job failed. This input is selected by default.
Wait for job completionWait for job run completion. This input is selected by default.
Trace LevelSelect the logging level from the dropdown list.
robotsIdsComma-separated list of specific robot names.
docs image

YAML pipeline

You can preview a fully parsed YAML document for the UiPath Run Job.
- task: UiPathRunJob@2
  displayName: 'Start ProcessProject'
  inputs:
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator
    #processName: 'ProccessProject_CI-Pipeline' # The name of the process
    #parametersFilePath: 'Input\\jobParameters.json' # json file with input values if the process requires them
    #priority: 'Low' # Options 'Low', 'Normal', 'High'
    #folderName: 'MyFolder' # Specify the folder to deploy to. For clasic folders, you can use specific robot names. For modern folders, you can use specific user and machine names.
    #strategy: 'Dynamically' # Options 'Specific', 'Dynamically'
    #jobCount: 1 # The number of job runs. (default 1) - used if strategy is 'Dynamically'
    #user: 'MyUser'
    #machine: 'machine'
    #robotsIds: 'robot1, robot2'
    #resultFilePath: 'Output\\testResults.json'
    #timeout: 3600
    #failWhenJobFails: false
    #waitForJobCompletion: false,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None- task: UiPathRunJob@2
  displayName: 'Start ProcessProject'
  inputs:
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator
    #processName: 'ProccessProject_CI-Pipeline' # The name of the process
    #parametersFilePath: 'Input\\jobParameters.json' # json file with input values if the process requires them
    #priority: 'Low' # Options 'Low', 'Normal', 'High'
    #folderName: 'MyFolder' # Specify the folder to deploy to. For clasic folders, you can use specific robot names. For modern folders, you can use specific user and machine names.
    #strategy: 'Dynamically' # Options 'Specific', 'Dynamically'
    #jobCount: 1 # The number of job runs. (default 1) - used if strategy is 'Dynamically'
    #user: 'MyUser'
    #machine: 'machine'
    #robotsIds: 'robot1, robot2'
    #resultFilePath: 'Output\\testResults.json'
    #timeout: 3600
    #failWhenJobFails: false
    #waitForJobCompletion: false,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None

UiPath Manage Assets

You can use this task to deploy, update or delete assets on your Orchestrator instance.

The following asset types are supported:

  • Text - stores only strings (it is not required to add quotation marks)
  • Boolean - supports true or false values
  • Integer - stores only whole numbers
  • Credential - contains usernames and passwords that the Robot requires to execute particular processes. For this asset type, you need to encode the username and password by using :: to separate the two fields.
To deploy assets, you need to add them in a CSV file encoded in UTF-8 as in the following example:
name,type,value, description asset_1_name,text,asset_value, asset_2_name,integer,123,asset_3_name,boolean,false, this is an asset description asset_4_name,credential,"username::password",name,type,value, description asset_1_name,text,asset_value, asset_2_name,integer,123,asset_3_name,boolean,false, this is an asset description asset_4_name,credential,"username::password",

For more information, see Orchestrator Assets.

Configuration

Use the following table to configure the UiPath Manage Assets inputs.

ArgumentDescription
Display name (Required) Enter a name for your task.
Orchestrator connection (Required) Configure the service connection to access UiPath Orchestrator services. You can configure a connection only for this step or use an existing global connection. For more information, see Configuring UiPath Orchestrator service connection.
Orchestrator folder (Required) Specify the folder where the process is being deployed. For classic folders, you can use specific robot names. For modern folders, you can use specific user and machine names.

To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use AccountingTeam\TeamJohn.

Choose asset action (Required) Select an option from the dropdown list.
Assets CSV File (Required) Add the CSV file path. You can use the same file for both Deploy and Update asset actions. Considerations:
  • The usage of quotes within values is allowed (e.g., ""A new version of RPA REPORT – AM Email Quote to Agent is available"")
  • JSON values are supported (e.g. "{""MaxRetryNumber"":3,""Name"":My Test Process}")
  • Comments are not supported (e.g. asset_1_name,credential,""username::password"" # asset_1_description comment)
For Delete asset actions, use only the name column and leave the other columns empty.
(Optional) You can set a description for each asset using the following syntax: type, value ,description
Trace LevelSelect the logging level from the dropdown list.
docs image

YAML pipeline

You can preview a fully parsed YAML document for the UiPath Manage Assets.
- task: UiPathAssets@2
  displayName: 'Deploy/Update assets'
  inputs:
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator
    #assetActionType: 'Deploy' # Options: Deploy, Delete
    #csvFile: 'assets_deploy.csv' # the path to the csv file containing the assets description,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None- task: UiPathAssets@2
  displayName: 'Deploy/Update assets'
  inputs:
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator
    #assetActionType: 'Deploy' # Options: Deploy, Delete
    #csvFile: 'assets_deploy.csv' # the path to the csv file containing the assets description,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None

UiPath Pack

The UiPathPack task enables you to package an existing UiPath project into a NuGet package.

Configuration

Use the following table to configure the UiPath Pack inputs.

ArgumentDescription
Display name (Required) Enter a name for your task.
Choose versioning method (Required) You can select an automatically generated version, use the project version, or define a new version. For more information, see Package Versions.
Version (Required) Available only on modern folders alongside a dynamic allocation strategy. Specifying the package version provides the possibility of tracking the built packages and their source versioning more efficiently. For example, the Microsoft assembly pattern can be utilized to build the NuGet package version: [Major].[Minor].[BuildNumber].[RevisionNumber].

The available options are:

  • AutoVersion: This option automatically updates the version to the next sequential number. You can use the following task configuration example:

    - task: UiPathPack@3
      inputs:
        versionType: AutoVersion
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'- task: UiPathPack@3
      inputs:
        versionType: AutoVersion
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'
  • ManualVersion: With this option, you can specify your own version number. You can use the following task configuration example:

    - task: UiPathPack@3
      inputs:
        versionType: ManualVersion
        version: '$(Build.BuildNumber)'
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'- task: UiPathPack@3
      inputs:
        versionType: ManualVersion
        version: '$(Build.BuildNumber)'
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'
  • CurrentVersion: This option keeps the version the same as specified in the project.json file. You can use the following task configuration example:
    - task: UiPathPack@3
      inputs:
        versionType: CurrentVersion
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'- task: UiPathPack@3
      inputs:
        versionType: CurrentVersion
        projectJsonPath: '$(projectFolder)/project.json'
        outputPath: '$(Build.ArtifactStagingDirectory)\artifact-manifests'
Project(s) Path (Required) Select the location of the project that is going to be packaged. It can be a direct path to a project.json file or a directory with one or multiple projects. In the latter case, each level one project is packaged individually.
Choose output type (Required only for manual versioning) Set a project type for the project that is going to be packaged. If you set None, the project type is going to be extracted from the project's JSON file.The following project types are supported: 'Process', 'Library', 'Tests', 'Objects', 'None'.
Orchestrator connection (Required) Configure the service connection to access UiPath Orchestrator services. You can configure a connection only for this step or use an existing global connection. For more information, see Configuring UiPath Orchestrator service connection.
Output PathSet a folder path where the package is going to be placed.
Run workflows analysisSelect this option to run workflow analysis rules on your automation project (e.g., Fail jobs in case of errors). By default, this option is not activated. For more information, see Application Testing Workflow Analyzer Rules.
Trace LevelSelect the logging level from the dropdown list.
docs image

YAML pipeline

You can preview a fully parsed YAML document for the UiPath Pack.
- task: UiPathPack@2
  inputs:
    #versionType: AutoVersion # Options: AutoVersion, CurrentVersion, ManualVersion 
    #version: '1.0.0' # Required when versionType == ManualVersion
    #projectJsonPath: '$(Build.SourcesDirectory)\MyFirstProcess'
    #outputPath: '$(Build.ArtifactStagingDirectory)\Packages\MyFirstProcess'
    #outputType: 'None' # Options: Process, Library, Tests, Objects, None
    #runWorkflowAnalysis: 'False'
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None- task: UiPathPack@2
  inputs:
    #versionType: AutoVersion # Options: AutoVersion, CurrentVersion, ManualVersion 
    #version: '1.0.0' # Required when versionType == ManualVersion
    #projectJsonPath: '$(Build.SourcesDirectory)\MyFirstProcess'
    #outputPath: '$(Build.ArtifactStagingDirectory)\Packages\MyFirstProcess'
    #outputType: 'None' # Options: Process, Library, Tests, Objects, None
    #runWorkflowAnalysis: 'False'
    #orchestratorConnection: 'service-connection-name' # Service connection to UiPath Orchestrator,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None

UiPath Deploy

The UiPathDeploy task lets you deploy a UiPath NuGet package onto UiPath Orchestrator.

Configuration

Use the following table to configure the UiPath Deploy inputs.

ArgumentDescription
Display name (Required) Enter a name for your task.
Orchestrator connection (Required) Configure the service connection to access UiPath Orchestrator services. You can configure a connection only for this step or use an existing global connection. For more information, see Configuring UiPath Orchestrator service connection.
Package(s) (Required) Define the feed for your UiPath NuGet packages.
Automatically create processSelect this option if you want to deploy a package without creating a process. The option is selected by default.If selected, you need to configure the Entry Point Path parameter.
Orchestrator folder (Required) Specify the folder where the process is being deployed. For classic folders (deprecated), you can use specific robot names. For modern folders, you can use specific user and machine names.
To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use AccountingTeam\TeamJohn.
Environment(Optional) If you use classic folders (deprecated), you need to define the environment where the packages are going to be deployed. You can use this field to create or update packages.You can use the following example to add your environments to this field, separated by a comma: testingEnvironment,productionEnvironment.
Entry Point Path(s) (Required) Specify entry point paths to create or update a process. The entry point path specifies the file path starting from the root of the project.Before configuring the entry point paths, consider the following: Entry points are available for Orchestrator version 21.4 or higher (e.g. 21.4.UiPathDeploy.entryPoints). For Orchestrator versions lower than 21.4, you need to enter any value, as the field must not remain empty. The default entry point is set to Main.xaml. Multiple entrypoints can be specified as 'Main.xaml, EntryPoint2.xaml '. For classic folders (deprecated) you can specify only one entry point for each environment. For nested folders you need to specify the file path, as follows:Folder01/Folder02/Main.xaml or Folder01/Folder02/Entrypoint.xamlFor more information, see Orchestrator Entry Points.
Trace LevelSelect the logging level from the dropdown list.
docs image

YAML pipeline

You can preview a fully parsed YAML document for the UiPath Deploy.
- task: UiPathDeploy@2
  inputs:
    #orchestratorConnection: # Service connection to UiPath Orchestrator
    #packagesPath: '$(Build.ArtifactStagingDirectory)\Packages\ITAutomationProcess'
    #folderName: 'ITAutomation'
    #environments: 'AutomationRobots' # Optional,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None- task: UiPathDeploy@2
  inputs:
    #orchestratorConnection: # Service connection to UiPath Orchestrator
    #packagesPath: '$(Build.ArtifactStagingDirectory)\Packages\ITAutomationProcess'
    #folderName: 'ITAutomation'
    #environments: 'AutomationRobots' # Optional,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None

UiPath Test

Typically, the UiPath Test task runs an existing test set on Orchestrator. Additionally, you can use it to pack, deploy, and run test cases by specifying the path to a UiPath test project. The latter option shows up in Orchestrator as a transient test set.

After the task has finished execution, the test results are uploaded to the Test tab in Azure DevOps. You can specify the test results output path in a JUnit format.

Depending on the result, the build will be either marked as successful (all test cases are passed), or failed (at least one test case failed).

Configuration

Use the following table to configure the UiPath Test inputs.

ArgumentDescription
Display name (Required) Enter a name for your task.
Choose a test execution methodChoose the test that you want to execute: Execute test set: Specify and run an existing test set in Orchestrator. Execute tests in project: Specify a project, deploy the package and run the test cases as part of a transient test set.
Orchestrator connection (Required) Configure the service connection to access UiPath Orchestrator services. You can configure a connection only for this step or use an existing global connection. For more information, see Configuring UiPath Orchestrator service connection.
Input parametersSpecify the file path to a JSON input file, such as Input\jobParameters.json. Specify the type argument if you're creating new input arguments at the Test Set level. Otherwise, you can use name and value.
Test set (Required for Execute test set method) 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 Test Set isn't in the default folder, make sure to include the relevant folder name before it. For instance, use AccountingTeam\TestSet.
Test project path (Required for Execute tests in project method) Specify the test project location that is going to be executed as part of a transient test set.
Environment (Required for Execute tests in project method) If you use classic folders (deprecated), you need to define the environment where the packages are going to be deployed. You can use this field to create or update packages.You can use the following example to add your environments to this field, separated by a comma: testingEnvironment, productionEnvironment.
Orchestrator folder (Required) Specify the folder where the process is being deployed. For classic folders (deprecated), you can use specific robot names. For modern folders, you can use specific user and machine names.
To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use AccountingTeam\TeamJohn.
Test results output pathSpecify the test results output path in JUnit format (e.g., Output\testResults.json).
TimeoutSpecify the number of seconds to wait before the request times out.
Trace LevelSelect the logging level from the dropdown list.
Attach Robot LogsSelect this option to attach INFO level logs from the executing Robot. By default, this is unselected. For more information, see Robot Logs.
docs image

YAML pipeline

You can preview a fully parsed YAML document for the UiPath Test.
-- task: UiPathTest@2
  inputs:
    #testTarget: TestProject # Options: TestProject, TestSet
    #orchestratorConnection: # Service connection to UiPath Orchestrator
    #testProjectPath: '$(Build.SourcesDirectory)\MobileAutomationTests' # Required only when testTarget = TestProject
    #testSet: 'MobileAutomationTests' # Required only when testTarget = TestSet
    #folderName: 'MobileAutomationTesting'
    #environment: 'TestingRobots' # Required only when testTarget = TestProject and the folder is a classic folder
    #testReportDestination: '$(Build.ArtifactStagingDirectory)\report.xml' # Optional
    #timeout: 200 # Optional, default = 3600s,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None task: UiPathTest@2-- task: UiPathTest@2
  inputs:
    #testTarget: TestProject # Options: TestProject, TestSet
    #orchestratorConnection: # Service connection to UiPath Orchestrator
    #testProjectPath: '$(Build.SourcesDirectory)\MobileAutomationTests' # Required only when testTarget = TestProject
    #testSet: 'MobileAutomationTests' # Required only when testTarget = TestSet
    #folderName: 'MobileAutomationTesting'
    #environment: 'TestingRobots' # Required only when testTarget = TestProject and the folder is a classic folder
    #testReportDestination: '$(Build.ArtifactStagingDirectory)\report.xml' # Optional
    #timeout: 200 # Optional, default = 3600s,
    #traceLevel: 'None' # Options: Critical, Error, Warning, Information, Verbose, None task: UiPathTest@2

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.