# Auto-generated Test Data

> You can use automatically generated test data to execute test cases using various sequences of data. Different data combinations can be used for both RPA and application testing.

## Overview

You can use automatically generated test data to execute test cases using various sequences of data. Different data combinations can be used for both RPA and application testing.

## How it works

Consider an example where you create multiple argument types (e.g., `Int32`, `Bool`, `String`) for an [If decision tree](https://docs.uipath.com/studio/standalone/2023.10/user-guide/the-if-activity). You use the auto-generate feature to generate values for your test cases to cover as many paths as possible during execution.

As part of symbolic execution, the workflow is interpreted and provided with values based on your arguments. The generated values will solve any conditional branch in the workflow.

![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/standalone-docs-image-171440-ae7a2a96.gif)

## When to use auto-generated test data

* Generate values to solve workflow conditions (e.g., `If`, `Switch`).
* Assign values to arguments and variables.
* Argument comparison with values or other arguments.
  :::important
  RPA and application testing with auto-generated data should not be used for scenarios with a large number of dependencies, variables and workflow paths that need to be covered.
  :::
  ## Supported argument types

Check the following list for the supported argument types when auto-generating test data:

* Decimal
  + `Double`
  + `Float`
  + `Int32`
  + `Long`
* String
  + `Boolean`
  + `Byte`
  + `Int64`
  + `Short`
* Array of primitive values: `short`, `int`, `long`, `float`, `double`, `byte`, `char`, `boolean`.
* Dictionary of primitive values: `short`, `int`, `long`, `float`, `double`, `byte`, `char`, and `boolean`. For keys, you can use variables, arguments, or literal data.
    :::note
    You can only use one key value pair for a dictionary argument. For example, you can use `dictionary["Name"] == "John"`, but not `dictionary["Name"]["Age"] == 34`
    :::
  ## Supported operations

* All boolean and numeric operations.
* For loops, a pass-at-least-once strategy is used that attempts to go through the loop at least one time.
* For strings, data is generated for the following functions: `Contains`, `Equals`, `StartsWith`, `EndsWith`, `Concat`.

## Adding auto-generated test data

:::note
* Update Testing Activities package to version 22.4. * Create or use an existing automated workflow. * Create arguments as parameters for auto-generated test data. See [Supported argument types](https://docs.uipath.com/studio/standalone/2023.10/user-guide/auto-generated-test-data#auto-generated-test-data).
:::

When you select **Auto Generate** as data source for your test data, a data table is generated with default values based on your arguments. A column is created for every argument where the first data row shows the default values.

1. Right-click an existing workflow and select **Create Test Case**.
2. Enter a name for your test case and change the default location, if required.
3. (Optional) [Add test case to execution template](https://docs.uipath.com/studio/standalone/2023.10/user-guide/execution-templates#execution-templates).
4. In the **Test Data** tab, click **Source** and select **Auto Generate** from the dropdown list.
5. Select the columns that you want to add.
6. (Optional) Edit the data table values or delete entire rows and columns.
7. (Optional) Click **Add Row** to generate another row of default values. You can edit the values.
8. Click **OK** to confirm. The data is generated and added to the test case. You can access the data through the arguments.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/standalone-docs-image-171260-6406f291.webp)

## Related articles

[Update or remove test data](https://docs.uipath.com/studio/standalone/2023.10/user-guide/data-driven-testing)
