Creating DataTables for your tests

How to create a DataTable

In order to run the same test with different sets of data, you need to create a DataTable. There are three ways to create a DataTable in mabl:

  • In the mabl app
  • From a CSV file
  • From test data-driven variables

📘

Maximum number of scenarios

DataTables can have a maximum of 500 scenarios.

In the mabl app

To create a new DataTable in the mabl app, take the following steps:

  1. Click on Configurations in the left-hand navigation.
  2. Navigate to the DataTables tab.
  3. Click on the + New Table button.
1185

The DataTables page

  1. Enter your data:
    • To add variables, click on Add variable. Enter the variable name in the row header, then add the values for each scenario (row) below.
    • To add a scenario, click on Add scenario. Enter the scenario name in the "Scenario name" column. Add the values for each variable in this scenario.
1284

Define your scenarios, variables, and values on the Add New DataTable page

  1. Save the DataTable.

Copying and pasting data

If your data resides in a spreadsheet, you can copy and paste the spreadsheet values into the table. The DataTable automatically expands to properly format the data.

600

Copying and pasting data into a DataTable

From a CSV file

📘

File type must be CSV

Currently, CSV is the only supported file format for DataTables. Attempts to upload other file types as a DataTable result in the following error: "Unsupported file type."

The first row of the CSV is converted into DataTable variable names when imported into mabl. For example, if the following table were uploaded as a DataTable, the variables would be login_button, welcome_message, logout_button.

login_buttonwelcome_messagelogout_button
LoginWelcome backLogout
Iniciar sesiónQué bueno verte de nuevoCerrar sesión
ログインお帰りなさいログアウト

You may define scenario names before uploading to mabl by adding a column called "scenario name" to your CSV file. This step is optional; you can also add scenario names after uploading the CSV file to the mabl app.

Uploading to the app

  1. Visit Configurations from the left-hand navigation.
  2. Click on the DataTables tab.
  3. Click on the Upload CSV button.

  1. Select the CSV file from your local machine that you'd like to add as a DataTable. The data from this CSV populates the table on the "Add new DataTable" page.
    • If you did not add a "Scenario name" column to your CSV file, the "Scenario Names" column appears empty. You can add scenario names on the Add New DataTable page.
2550

DataTable from an uploaded CSV

  1. Click the Save button.

From test data-driven variables

If a test contains test data-driven variables, you can create a DataTable table from the Test Details page by clicking the Generate DataTable button.

1267

Generating a DataTable from test data-driven variables

Clicking on this button takes you to the Add New DataTable page, where you can add different scenarios to test.