Subscribe

UiPath Studio

The UiPath Studio Guide

Data-Driven Testing

Overview


Application testing can require working with large data sets to verify the workflow execution and cover corner cases. Instead of creating multiple test cases for each data set, you can import and use your data sets with your projects. The test data is imported to your project as a JSON file. You can find this file under Project > Test Data.

Conditions


You can configure the data variation file to store up to 2Gb of data. The file is named Package.VariationFile.MaxSizeInKBytes.

Data Sources


  • Excel data tables (XLSX, XLSM)
  • CSV
  • JSON files

Add test data


  1. Open your workflow in Studio.
  2. In the Project panel, right-click a test case and select Add Test Data.
348
  1. Browse for your XLSX or CSV file and then select the Worksheet. If you have an updated JSON file, you can select that from the dropdown list.
  2. Select individual or all the values from your data file.
366

The data is imported from the Excel file as InArgument together with its associated values, as you can see in the following screenshot with the workflow and Excel file side-by-side.

688

👍

Additional actions

Run/debug file with data variations


You can debug or run your test case using selected or all of your test data.

  1. In the Design ribbon, click Run file with data variations or Debug file with data variations.
  2. Select the data that you want to use and confirm your action.
915

If you use a Verify Expression with Operator activity for your test case, the execution is performed once for each selected data set.

Manage data variation files


The following table lists the actions that you can take for the test cases that contain data variation.

ActionDescriptionProcedure
Update test dataUpdate the imported test data. You can use this when you have made any changes to the Excel file. Any new columns will be added as arguments to the test case.1. Open Studio and navigate to your project.
2. In the Project panel, right-click a test case with data variations and select Update test data.
3. Browse for your Excel file and then select the Worksheet.
4. Select individual or all the values from your data file.
5. Click Import to save changes.
Remove test dataRemove test data from the test case.1. Open Studio and navigate to your project.
2. In the Project panel, right-click a test case with data variations and select Remove test data.
Modify test data JSON fileUpdate test data directly into the JSON file. The file is created after adding test data to the test case.1. Open Studio and navigate to your project.
2. Navigate to Project > Test Data and open the JSON file with a code editor.
The JSON file name is stored as ExcelName_SheetNo.json.

Updated about a year ago

Data-Driven Testing


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.