Create DataTables

A DataTable is a file that stores test data in rows and columns. Each row represents one test iteration, allowing you to run the same flow with different data sets.

You can use DataTables to:

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 also have multiple rows for distinct users, each with different permissions, without splitting them into separate DataTables.

You can create a DataTable directly in Scriptless Mobile or upload an external DataTable file, in CSV format. External files must follow the required structure (title row, data type row, and data rows). For example, you can create a CSV file in Excel and upload it. To learn more, see DataTable structure.

DataTable structure

When you upload a DataTable created outside Scriptless Mobile, the file must abide to the following structure:

  • Title row (Row 1): Column names

  • Data type row (Row 2): Data type for each column

    Allowed date types:

    • Device: Device ID

    • String: Text

    • Media: Path to repository file

    • Boolean: True or false

    • Number: Whole number (integer)

    • Secured String: Encrypted text

  • Data rows (Row 3+): Test data values matching the specified data type

Scriptless Mobile uses this structure to validate and map your data correctly. If the structure does not meet these requirements, the DataTable import may result in unexpected behavior.

The following image illustrates this structure.

The following image shows a sample CSV file.

A sample CSV file that you can upload in Scriptless Mobile is available here: SampleDT.csv

If you create a DataTable directly in Scriptless Mobile, you don’t need to worry about this structure.

Create a CSV file in Excel

A simple way to create a CSV file is by using Microsoft Excel:

  1. In the first row, enter the column names.

  2. In the second row, specify the data type for each column.

  3. In all subsequent rows, enter your data.

  4. When done, save the file in CSV format.

Limitation

In Scriptless Mobile, a DataTable column with the URL data type is converted to the String data type. If you edit this column and save the DataTable, the column remains as String in Scriptless Mobile and other applications.

Overview video

Watch the following short video for an overview of working with DataTables, or refer to the steps following the video.

Steps

Click a procedure to expand its steps.

What's next?

The command parameter of a test can use a DataTable as its value. To learn more, see Use a DataTable as a parameter value.