Create DataTables

A DataTable is a file that contains data for tests. It can have multiple columns and rows that contain data. Each data row in a DataTable signifies one test run.

A DataTable can be used as a command parameter in a command that is part of a loop. For this, you must first configure a test variable that has a value of type DataTable.

DataTables let you run the same test flow using different data. For example, if you create two DataTables for a login flow, one for Admin users and one for users with fewer permissions, you can run different tests using the relevant DataTables. You can add one or more DataTables to a test flow.

You could have multiple rows for distinct users, each with a different set of permissions. They don't need to be split into different DataTables.

A DataTable includes the following rows:

  • Title row: The first row specifies the column name and can be any name you wish.

  • Data Type row: The second row specifies the data type for the column.

    Allowed data types are: Boolean, Device, Number, Media, String, Secured String

  • Data row: The third row and the subsequent rows represent the test data. Data must conform to the type in Row 2.

In your tests, you can use a DataTable as:

Watch this video for an overview of working with DataTables.

The command parameter of a test can use a DataTable. In this case, an existing DataTable acts as a command parameter value.

The following requirements apply before adding a DataTable to a command parameter:

  • A DataTable must be created and saved in the repository. An existing DataTable can also be used.

  • The test variables must be configured to have a variable of type DataTable.

Adding a DataTable to a command involves creating a loop, selecting the DataTable, and specifying the relevant DataTable column for the command parameter.