What is UiPath?
UiPath is an enterprise automation platform best known for robotic process automation (RPA), which uses software “robots” to execute repeatable, rules-based work across applications and systems. It enables organizations to model processes, build automations with low-code tooling, and run them at scale to reduce manual effort, errors, and cycle time. The platform typically includes capabilities for discovering and documenting processes, orchestrating and monitoring automation jobs, managing credentials and governance, and integrating with common business applications.
Why Integrate UiPath with SpiraTest?
Integrating UiPath with SpiraTest centralizes your quality workflow by keeping SpiraTest as the system of record for test cases, execution history, and release readiness while UiPath runs the automation. It improves end-to-end traceability by linking automated results back to SpiraTest test cases and (where applicable) requirements, creating stronger governance and auditability. It streamlines reporting by consolidating manual and automated outcomes into a single set of dashboards and metrics, reducing time spent reconciling results across tools. It also supports more predictable execution by enabling scheduled or pipeline-driven automation runs with results and artifacts captured back in SpiraTest for faster triage and decision-making.
How To Integrate UiPath with SpiraTest
There are two ways to have the integration work generally, either launched by SpiraTest using RemoteLaunch, or executed in a pipeline, with the results 'passively received':
- RemoteLaunch “Command-Line” execution wrapper (common)
Spira’s RemoteLaunch ecosystem includes a Command-Line option, which teams use to trigger automation that isn’t covered by a dedicated plugin. This is often the cleanest way to run a UiPath job/test pack (via whatever CLI/API wrapper you standardize) and return a pass/fail + artifacts into Spira.
- Push results into Spira via API (pipeline-driven)
If UiPath execution is triggered from CI/CD (or Orchestrator schedules), you can have the pipeline post outcomes back to SpiraTest as test runs. This is a good fit when you want UiPath to “own execution” but Spira to “own governance.”
Regardless of which method is chosen for launching the tests, you will typically want to have UiPath generate a JUnit style XML report file and then use one of our two JUnit import tools:
In the rest of this example we are going to focus on Option 2, using a Pipeline and CI/CD to run the tests and then publish the results into SpiraTest.
Step 1: Executing the UiPath Test and Generating a JUnit Report File
To execute a UiPath test via the command line and obtain a JUnit report file, you use the uipcli command-line interface tool with specific parameters to specify the output format and destination. This method is suitable for CI/CD integrations.
Prerequisites
- The UiPath CLI is part of the CI/CD integration tools. You can download it from the UiPath GitHub repository or find it in your installation.
- You need the path to your UiPath testing package (.nupkg file) or an existing Test Set name in Orchestrator
Command for Test Execution and JUnit Report Generation
The general syntax for running a test and generating a JUnit report is as follows:
uipcli test run --out junit --result_path <destination_file_path> <other_parameters>
You should use the uipcli test run command with the --out and --result_path parameters to specify the report format and destination:
uipcli test run --out junit --result_path <path_to_save_report.xml> --project-path <path_to_your_uipath_package>
or for a test set in Orchestrator:
uipcli test run --out junit --result_path <path_to_save_report.xml> --testset <Your_Orchestrator_Folder>\\<Your_TestSet_Name>
Parameters
test run: The sub-command to execute the tests.--out junit: Specifies that the output format of the results should be a JUnit XML file.--result_path <path_to_save_report.xml> / -r <path>: The destination path and filename for the generated JUnit XML report. If not specified, the report is saved in the current workspace directory.--project-path <path_to_your_uipath_package> / -P <path>: The full path to your UiPath testing package file (.nupkg). This method builds and runs the test cases locally as a transient test set.--testset <name> / -s <name>: The name of an existing Test Set within Orchestrator. This requires a connection to Orchestrator to be configured.--timeout <seconds> / -w <seconds>: (Optional) The time (in seconds) to wait for the test execution to complete (default is 7200 seconds).--attachRobotLogs: (Optional) Attaches Robot Logs for each executed test case to the report.
Example
Here is an example command assuming the uipcli is in your system's PATH, executing a local package and saving the report to a results folder:
uipcli test run --out junit --result_path "C:\temp\testresults\results.xml" --project-path "C:\UiPath\MyTestProject\package.nupkg"
After the command runs, a results.xml file containing the JUnit-formatted test results will be available at the specified location.
You can find more details on configuring the CLI in the UiPath Documentation Portal.
Next we need to install and configure the SpiraTest xUnit (aka JUnit) reporter. In this example we'll use the Python version, but you can use the NodeJS version just as easily.
Step 2: Configure the SpiraTest xUnit Reporter
Prerequisite: This step requires that you have Python installed and PIP.
The first thing we need to do is download and install the SpiraTest xUnit Reporter from PyPi into the same folder that has our installation of uipcli:
pip install spira-addons-xunit
Once that is installed, you need to modify the spira.cfg file to point to your SpiraTest installation and map the various test cases and test sets in SpiraTest to the test suites and test cases reported by UiPath. For example, if we have the following test classes:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="UiPath Test Automation Results" tests="2" failures="1" errors="0" time="15.2">
<testsuite name="Process_Workflow_Suite" tests="2" failures="1" errors="0" time="15.2" timestamp="2025-01-21T10:45:00">
<testcase name="TestCase_Login" classname="Process_Workflow_Suite" time="5.1">
<skipped/>
</testcase>
<testcase name="TestCase_DataEntry" classname="Process_Workflow_Suite" time="10.1">
<failure message="Data entry failed on 'Submit' button" type="AssertionError">
Error details and stack trace go here.
</failure>
</testcase>
</testsuite>
<!-- Additional test suites can be added here -->
</testsuites>
Then we'd use:
[credentials]
# Following are required
url = https://mycompany.spiraservice.net/
username = username
token = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX}
project_id = 68
# Following are optional:
release_id = 228
test_set_id = 77
create_build = true
# Spira Test case for a specific classname.name
[test_cases]
Process_Workflow_Suite.TestCase_Login = 1130
Process_Workflow_Suite.TestCase_DataEntry = 1131
# Spira Test sets for a specific name
# If not, the global value is used instead
[test_sets]
Process_Workflow_Suite = 78
This maps the test cases in the XML results file to the following SpiraTest test cases:
- Login Test Case = TC:1130
- Data Entry Test Case = TC:1131
In our sample, we have also mapped the test suites to the following SpiraTest test sets:
- Process Workflow Suite = TX:78
Now that we have completed the mapping, we can now upload the results into SpiraTest...
4. Run the xUnit Reporter to upload the results to SpiraTest
Once that is done, we simply need to call the SpiraTest xUnit reporter and pass in our configuration file and the path to the UiPath results:
python -m spira_xunit_reader "C:\temp\testresults\results.xml" spira.cfg
This will report something like the following:
Creating new build in Spira at URL 'https://mycompany.spiraservice.net/'.
Sending test results to Spira at URL 'https://mycompany.spiraservice.net/'.
Successfully reported 2 test cases to Spira.
Congratulations: You have now execute UiPath tests and the results are now in SpiraTest