Creating DataTables for your tests

When automating user scenarios, it is common to have a test that needs to run multiple times with different sets of data. As an example, think about verifying that all of your user types can login to your application. You can create a unique test for each user, but each of these would have all of the same steps and just different data (username and password).

With the goal of simplifying this process and reducing the need to create and maintain a test for each user, in mabl you can create one login test and organize the different scenarios you want to test into DataTables.

A DataTable is a table of data that defines what variables a test uses and what their values should be in each scenario. In addition to the user login scenario outlined above, some other use cases for DataTables include:

  • localization: testing the same page for content in different languages
  • search validation: checking that different search queries yield the expected result

How to create DataTables

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

The DataTables page

  1. Fill in the values with as many rows and columns as you'd like, by clicking the "Add scenario" or "Add column" buttons.
12841284

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

  1. Save the DataTable.

After saving a DataTable, you can associate it with a new or existing test. Please visit this link to learn how to associate and run tests with a DataTable.

👍

Copying and pasting data

If your data resides in a spreadsheet, you can copy and paste the spreadsheet values into the table, and it will automatically expand to properly format the data. (See the following gif for an example.)

600600

How to delete a DataTable

To delete a DataTable, click on the Delete icon.

11561156

Did this page help you?