Studio User Guide
Last updated Jul 15, 2024

Test Activities

Test Activity

The Test Activity context menu option part of the Designer panel is used for running a test on the currently selected activity. When clicked, the Locals panel opens displaying the variables and arguments in scope.

Test Activity can be used in two ways:

  • add default values to properties and test
  • add arguments and/or properties to activity properties and use the Local panel to add values after clicking the Test Activity option.

Double-click the value field of a variable or argument, or click the icon in the Locals panel, and add a new value. Next, click Step Into to focus and execute the activity, and monitor the variable or argument's value in the Locals panel.

The same is available when clicking Continue, but the values are not visible in the Locals panel.

Please take into consideration that dynamic checks when variables depend on other variables that are defined later are not supported.

Execution logs generated by the Test Activity action are visible in the Output panel. Exceptions in Studio can be bubbled up, which means that the exception may be passed to parent containers in case it may be handled by them.

The Test Activity option is not available during debugging.

Example of Using Test Activity

For the If Activity example, we created a process that asks the user for two numbers, checks to see if one is divisible by the other, and depending on the result, displays a different message in the Output panel.

To check the behavior of the If activity defined in the process, use the Test Activity option, as illustrated below:

The Test Activity action places the activity in the debugger and asks you for values to variables. Once provided, click the Continue button for the debugging process to continue. In this particular case, a message was written in the Output panel with the correct answer, which means that the expressions written in the If activity were correct.

Create Test Bench

The Create Test Bench option allows for the creation of automation building blocks, which can then be tested and added to the final workflow.

It is used for testing activities, working with variables and debugging the process. All this is done in a test bench workflow, a temporary sequence that’s not part of the current project and that is discarded when closed.

The Create Test Bench option is similar to the Test Activity option, with the exception that the latter is contained and defined in an actual workflow.

To use the Create Test Bench option, go to the Activities panel search bar or use Ctrl + Alt + F keyboard shortcut. Type the name of an activity and right-click to open the context menu.

Select Create Test Bench and the activity is automatically added to a sequence file not included in your project. From there you can add other activities, change their default properties and debug the process. The Output panel displays any logs or errors found during the debugging.

To save the file to your project, simply use the ribbon option Save as, add a file name and save it to the same file path as your project.

Please note that Create Test Bench does not work with Pick Branch activity.

Run to this Activity

The Run to this Activity option is available when right-clicking an activity in the Designer panel.

This option starts the debugging process and pauses before the selected activity is executed while highlighting it in the panel. If Run to this Activity is triggered when debugging is already paused, the execution continues until the activity is reached.

Run from this Activity

The Run from this Activity context menu option enters debugging in a pause state, allowing you to make changes to the values of variables and arguments from the Locals panel. Press Continue to start debugging or use actions such as Step Into, Step Over, Step Out.

  • When used for an activity inside a scope, the scope activity is also executed.
  • An error occurs if you use Run from this Activity for an activity added inside one of the following scope activities: Try Catch, Switch, Parallel, Pick, Trigger Scope, or Retry Scope.
  • Test Activity
  • Create Test Bench
  • Run to this Activity
  • Run from this Activity

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.