Studio
2020.10
false
Banner background image
OUT OF SUPPORT
Studio User Guide
Last updated Dec 20, 2023

Application Testing

Studio Pro supports the creation of specialized test cases for conducting automated application testing, either in VB or C#. Individual test automation projects can be created in StudioPro, used for verifying data, and included in CI/CD pipeline scenarios.

Application testing can be performed with Test Cases and Data Driven Test Cases, sequences that make use of verification activities part of the UiPath.Testing.Activities pack, together with activities from other packages.

Data Driven Test Cases use data imported as arguments into the project to verify test case execution. The entire data or only certain values may be used at execution.

Test automation projects may contain several test cases with linear execution, as activities are organized in sequences, this type of project has multiple entry points. There is no main workflow file and execution is performed per test case unless other .xaml files are invoked.

With Studio Pro, workflows can be converted into test cases or imported as test cases from other projects. Later, application testing projects may be published to Orchestrator, managed and executed from the Test Cases page.

Test Cases

Use the Test Automation project type from Backstage view > Start to start designing a test case.



Several such .xaml files can be added to a project by using the New > Test Case ribbon option.

The default activities packages for this type of project are: UiPath.System.Activities, UiPath.UIAutomation.Activities, and verification activities from the UiPath.Testing.Activities.

Verification activities such as Verify Control Attribute, Verify Expression, and Verify Expression with Operator are used for testing the data used by your workflows.

Such activities behave differently when executed or debugged. If a verification activity encounters an error, the execution does not stop to throw the error, but rather logs the failed activity in the Output panel. If the activity was executed successfully, it is marked in the panel.



Data-Driven Test Cases

Application testing can require working with large data sets to verify the workflow execution and cover corner cases. Rather than creating multiple test cases for each data set, import and use your data sets inside the project with the Data-Driven Test Case file type.

In the Project panel, right-click a test case and select Add Test Data.



Go to Variation File to choose an Excel file to import, and then select a worksheet.



Click Import. The imported Excel file is accepted as input, data is imported as InArgument types together with values from the file.


As a next step, you can use the Verify Expression with Operator activity to compare values with those from the imported Excel file, using available operators. Read more about this activity here.

Run/Debug with Data Variations

Executing or debugging a Data Driven Test Case can be done in two ways, either by using all the imported data or discretionary by selecting the specific data to use.

Click the Run file with data variations or Debug file with data variations options from the ribbon. The Data variations window opens:



Select the data you would like to use for running or debugging the test case by clicking the checkbox next to each row. Click Run or Debug after the selection is made.

If the test case project uses the Verify Expression with Operator activity, the execution is performed once for each selected data set.

Note:

If changes were made to the Excel data set, remove and add the data set again in the test case project.

Remove Test Data

Imported data sets can be removed from a Data Driven Test Case file by right-clicking the .xaml file in the Project panel and selecting Remove Test Data:


A new data set can be added by selecting the Add Test Data option.

Test Case Migration

Existing workflows used for testing purposes can be converted to and from test cases using Studio Pro. In addition, you can create an RPA Testing project from existing processes.

Convert to Test Case

To convert workflows into test cases right-click the files in the Project panel and select Convert to Test Case:



Import Test Cases

If you already created workflows or test cases, you can import them in your current project by right-clicking the project node, and selecting Import Test Cases:



Imported .xaml files are added to the project tree, as draft test cases.

Import Services

Similarly to importing data collections into API Test Automation libraries, you can import such collections into your Application Testing processes using the New Service wizard.

Please take into consideration that this is available only for libraries and Test Automation projects created with a Studio Pro license.

Publish Test Cases

Test Case and Data Driven Test Case files are created as drafts by default. Before attempting to publish, these .xaml files need to be set as publishable from the Project panel.


Multi-select is available, simply hold the Ctrl key while selecting each file individually, then right-click > Set as Publishable.



Note: Publishable test cases can be set back to draft by right-clicking the test case and selecting Set as Draft.
After selecting Set as Publishable, the file's icon turns from gray to blue indicating that the file is ready to be published and packaged in a .nupkg file.
Note: Unless set to publishable, draft files are not packaged and published.

Publishing test cases is performed in a similar way as for other types of projects. Use the Publish option from the Studio Pro ribbon. You can set a version of the project and use the Certificate Signing options, read more about publishing projects here.

Test cases can be published to Orchestrator, Robot defaults, or a custom path. If you wish to publish to Orchestrator, make sure your Robot or UiPath Assistant is connected to Orchestrator, follow the steps here.

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.