Skip to main content

UiPath-Test

UiPath-Test

GitHub Action for running all publishable test cases in UiPath projects. Detailed test results are provided in json format from this action. They can also be found by navigating to the Testing tab in UiPath Orchestrator. Built as a wrapper around the UiPath CLI task for running tests from a UiPath project.

The action triggers test cases to be run by robots through UiPath Orchestrator and writes the test result outputs to the GitHub Actions job summary. See the setup section below on requirements for running test cases.

Setup

This action requires the following things to be set up in UiPath Orchestrator:

Example usage

Minimum required inputs

Using the minimum required inputs to this action assumes that the action is intended to run tests for all projects in the repository, targeting a tenant/organization within UiPath Automation Cloud, with the credentials for an external application that has been configured with the default application scopes noted here.

      # Run all publishable unit tests from UiPath projects in this repository, targeting an organization and tenant in UiPath Automation Cloud
- name: UiPath Test
uses: RPA-Global/UiPath-Test@v1
with:
orchestratorTenant: TestTenant
orchestratorFolder: Finance/SE
orchestratorApplicationId: ${{ secrets.ORCHESTRATOR_APP_ID }}
orchestratorApplicationSecret: ${{ secrets.ORCHESTRATOR_APP_SECRET }}
orchestratorLogicalName: testorg

All inputs used

The example below illustrates how the action can be used for a repository of multiple UiPath projects, where two specific projects are intended to be tested. This example also illustrates the inputs needed when targeting a non-Automation Cloud Orchestrator setup.


# Run all publishable unit tests from the projects Perfomer/project.json and Dispatcher/project.json, targeting an Orchestrator instance in an internal environment
- name: UiPath Test
uses: RPA-Global/UiPath-Test@v1
with:
projectFilePaths: |
Performer/project.json
Dispatcher/project.json
orchestratorUrl: https://mycompany.orchestrator.com/
orchestratorTenant: TestTenant
orchestratorFolder: IT/Special
orchestratorApplicationId: ${{ secrets.ORCHESTRATOR_APP_ID }}
orchestratorApplicationSecret: ${{ secrets.ORCHESTRATOR_APP_SECRET }}
orchestratorApplicationScope: "OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Jobs OR.Machines.Read OR.Monitoring OR.Robots.Read OR.Settings.Read OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Users.Read"
orchestratorLogicalName: myorg
retryCount: 1

Inputs

NameDescriptionRequiredDefault valueExample value
projectFilePathsMultiline input containing a list of projects to perform the operations on. If left empty, the action scans for any project.json files in the repositoryFalseTheProject/project.json
orchestratorUrlBase URL to Orchestrator instanceFalsehttps://cloud.uipath.com/https://mycompany.orchestrator.com/
orchestratorTenantName of the Orchestrator tenantTrueTestTenant
orchestratorLogicalNameId of the UiPath organizationTruetestorg
orchestratorFolderThe fully qualified name of the Orchestrator folder where processes are deployed toTrueFinance/SE
orchestratorApplicationIdApplication ID for the CLI to authenticate with UiPath OrchestratorTrue${{ secrets.ORCHESTRATOR_APP_ID }}
orchestratorApplicationSecretApplication Secret for the CLI to authenticate with UiPath OrchestratorTrue${{ secrets.ORCHESTRATOR_APP_SECRET }}
orchestratorApplicationScopeExternal application scopeFalse"OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Jobs OR.Machines.Read OR.Monitoring OR.Robots.Read OR.Settings.Read OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Users.Read"
retryCountNumber of retries for failed test cases (by default, no retry is set).False1

Outputs

NameDescription
testExecutionLinksComma-separated list of URLs to directly access the test execution(s) triggered by this action
testResultsMarkdown formatted table listing the tests that have been run and whether they passed or failed. Each project tested gets its table with a link to the test execution(s) in Orchestrator as part of its header. If no test cases were found for a project, nor set as publishable, a warning message is added.
containsPublishableTestCasesBoolean value indicating whether any test cases set as publishable were found in the repository
testResultsFolderPath to the folder where the test result JSON files created by the UiPath CLI are stored. Can be used for further processing, such as uploading to Artifacts or sending to another action.

Action details

This section provides detailed information extracted from the action.yml file of the GitHub Action, including inputs and outputs

Inputs

Click to view all inputs to the action
InputDescriptionRequiredDefault
projectFilePathsUsed for passing explicit paths to project files to perform analysis. Can be used as multi-line inputsfalsenull
orchestratorUrlOrchestrator instance URLfalsehttps://cloud.uipath.com/
orchestratorTenantTenant on the Orchestrator instancetruenull
orchestratorFolderFolder path in modern folder setuptruenull
orchestratorApplicationIdAccount for authenticating to Orchestratortruenull
orchestratorApplicationSecretPassword for the Orchestrator accounttruenull
orchestratorApplicationScopeAccess scope for external applicationfalseOR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Jobs OR.Machines.Read OR.Monitoring OR.Robots.Read OR.Settings.Read OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Users.Read
orchestratorLogicalNameLogical name for Orchestrator organizationtruenull
retryCountNumber of retries for failed test cases (by default, no retry is set).falsenull

Outputs

Click to view all outputs from the action
OutputDescription
testExecutionLinksOutputs a comma-separated list of Orchestrator links for viewing test results
testResultsMarkdown formatted table listing the tests that have been run and whether they passed or failed
containsPublishableTestCasesBoolean value indicating whether any test cases set as publishable were found in the repository
testResultsFolderPath to the folder where the test result JSON files created by the UiPath CLI are stored. Can be used for further processing, such as uploading to Artifacts or sending to another action.