Skip to main content

Sending Test Results to Vansah from UiPath

Connect UiPath workflows to Vansah, create Test Runs, report step results, and attach screenshots or files as execution evidence.

Send automated test results from a UiPath workflow to Vansah. Create a Test Run, record each step’s outcome, and attach screenshots or files so your team can review the execution in Jira.

The Vansah.SendResults.Activities package provides Vansah Start Test Run and Vansah Add Test Step for this workflow. It also includes Quick Test for sending an overall result.

Vansah Start Test Run connected to Vansah Add Test Step in a UiPath sequence

Before you begin

You need

Details

UiPath Studio

Version 26.0 or later, as required by the published Vansah package.

Vansah activity package

Vansah API token and URL

Create an API token and find your workspace’s API Connect URL.

Jira space and Test Case

Know the Jira space key, such as DEMO, and Test Case key, such as DEMO-C2.

Execution target and permissions

The Test Case must already be linked to the selected work item, folder, or Test Plan requirement. The token account needs access to the Jira space and permission to execute Test Cases.

1. Install the Vansah package

  1. Open your workflow in UiPath Studio and select Manage Packages from the ribbon.

  2. In Settings, add or enable the nuget.org feed: https://api.nuget.org/v3/index.json.

  3. Under All Packages, search for Vansah.SendResults.Activities.

  4. Select the published stable version, click Install, then Save.

  5. Find the Vansah activities in the Activities panel.

For package-source setup, see UiPath’s activity package guide.

2. Configure the token

  1. On the machine that runs the workflow, create an environment variable named VANSAH_TOKEN containing your Vansah API token.

  2. Make sure the variable is available to the Windows account running Studio or the Robot.

  3. Restart Studio or the Robot process after changing the variable.

Leave the activity’s Token field empty to use VANSAH_TOKEN, or supply the token through your workflow’s configured credential handling. Keep it out of shared workflow files and logs.

3. Start the Test Run

Add Vansah Start Test Run before the activities that report step results.

Field

What to enter

Space Key

The Jira space key, such as DEMO.

Test Case Key

The existing Test Case key, such as DEMO-C2.

Run Type

Choose Work Item, Test Folder, Standard Test Plan, or Advanced Test Plan.

API URL

Your workspace’s Vansah base URL. Enter the URL for the correct region without adding an API endpoint path.

Token

Leave blank to read VANSAH_TOKEN, or supply your token value.

Operation

Select Activate to send the request. Deactivate skips sending it.

If you enter a literal string in an expression field, use the syntax required by your UiPath workflow language. For a VB expression, enter the space key as "DEMO" rather than an unquoted variable name.

Run Type choices for a Vansah Test Run in UiPath

Choose the execution target

Run Type

Required target fields

Work Item

Set Work Item Key, for example DEMO-2.

Test Folder

Set Test Folder Path to the existing path. Use Copy Folder Path in Vansah to get the exact value.

Standard Test Plan

Set Test Plan Key, for example DEMO-P7, and choose an existing Iteration. The activity’s picker offers iterations 1–5.

Advanced Test Plan

Set the plan key and existing iteration, then choose Requirement Type. Supply the related Work Item Key or Test Folder Path.

Set the Environment, Version, or Sprint under Test Run Properties when needed. Include any properties that your Jira space makes mandatory, and check that the Test Case is not blocked.

Save the Response output

Create a variable named VansahTestRun with type Newtonsoft.Json.Linq.JObject. Set it as the activity’s Response output, and keep it in scope for the step activities that follow.

Creating the VansahTestRun variable with Newtonsoft.Json.Linq.JObject type

Pass this returned object to every related step activity so it can identify the correct run and step logs. Start the run and report its steps in the same process.

4. Capture evidence when needed

To attach a screenshot, add UiPath’s Take Screenshot activity after the action you want to capture. Save the screenshot to a file and store its file output in an IResource variable, such as screenshotFile.

Storing Take Screenshot file output in an IResource variable

You can pass this resource to the Vansah activity’s Screenshot field. Alternatively, use Screenshot Path with a full path to an existing file that the Robot account can read. Screenshot Path takes priority when both inputs are provided.

5. Send each step’s result

Add Vansah Add Test Step after the test action and any evidence capture. Repeat it for each step you want to report.

Field

What to enter

Test Run Response

The VansahTestRun output from Start Test Run.

Step Number

The matching step number in the Test Case, such as 1 or 2. Check it against the Test Case version used by the run.

Result

Choose PASSED, FAILED, UNTESTED, or N/A.

Step Result

For a value from a variable or expression, leave Result on (use Step Result field) and supply one of the supported result names here.

Actual Result

Describe the observed outcome, such as “The dashboard did not load after sign-in.”

Screenshot or Screenshot Path

Optional evidence from the preceding capture or an existing file.

Operation

Select Activate to update Vansah.

The Result dropdown takes priority over Step Result. This activity supports the four listed results; do not enter an additional workspace label as a new supported value.

For Plain Text or BDD Test Cases, the activity updates the script’s single result log rather than a numbered multistep row.

Configuring Test Run Response, Step Number, result, and screenshot evidence

6. Run and verify the results

  1. Confirm that Operation is set to Activate on both the start activity and each step activity.

  2. Run your workflow and check UiPath’s Output panel for run creation, step update, and attachment messages.

  3. Open the matching execution in Vansah and confirm the step results, actual results, and evidence.

Each successful Start Test Run creates another execution. After a timeout, check whether the run was created before rerunning the workflow.

Vansah execution showing the posted result, actual result, and screenshot attachment

Example: A login workflow reports step 1 as PASSED after entering credentials. If the dashboard fails to load at step 2, it captures the error and reports FAILED with an actual result and screenshot. Review both steps in the same Test Run.

Troubleshooting

Problem

What to check

Activity is deactivated

Set Operation to Activate on the activity named in the message.

Token not configured or invalid

Check the complete API token and the VANSAH_TOKEN variable under the Robot’s Windows account. Restart the process after changing it.

Authentication or permission error

Check the token, workspace region URL, Jira space access, and execution permissions.

Required target is missing

Match the Work Item Key, Test Folder Path, or Test Plan Key and requirement fields to the selected Run Type.

No log found for a step

Pass the correct start Response, check the step number, and confirm the run uses a Test Case version containing that step.

Screenshot is not attached

Check that the file exists, contains data, and is readable by the Robot account. Check which screenshot input takes priority and review Output for warnings.

For the underlying requests and result behavior, see Create a Test Run and Record a Test Step Result.

Did this answer your question?