studio
2021.10
false
UiPath logo, featuring letters U and I in white
OUT OF SUPPORT

Studio User Guide

Last updated Nov 18, 2024

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. Alternatively, you can select multiple test cases in your project if you want to add test data to all of them.



  3. 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.
  4. Select individual or all the values from your data file.



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.


Tip:

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.



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.

Action

Description

Procedure

Update test data

Update the imported test data by choosing whether to create a new file or overwrite existing 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 data

Remove 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 file

Update 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.

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.