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
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:
- Click on Configurations in the left-hand navigation.
- Navigate to the DataTables tab.
- Click on the + New Table button.
The DataTables page
- 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.
Define your scenarios, variables, and values on the add new DataTable page
- 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.
Copying and pasting data into a DataTable
From a CSV file
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
|Qué bueno verte de nuevo
Uploading to the app
- Visit Configurations from the left-hand navigation.
- Click on the DataTables tab.
- Click on the Upload CSV button.
- 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 name column appears empty. You can add scenario names on the add new DataTable page.
DataTable from an uploaded CSV
- 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.
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.