Assigning scenario names to your DataTables

A DataTable scenario contains a set of variables that is passed to a test run. When a test is associated with a DataTable, it generates one run for each scenario, or row, of a DataTable. You can use the first column of a new or existing DataTable, designated as "Scenario name" in the table, to differentiate each run of a test of a test from that table from the rest.

Defining scenario names

In the mabl app

To define DataTable scenario names from the mabl app, take the following steps:

  1. Click on Configuration in the left-hand navigation.
  2. Select the DataTables tab.
  3. Click on the table you wish to add scenario names to. The "Scenario name" column appears as the first column in Every DataTable.
  4. Edit the table to define the scenario names as you see fit. Future runs against that table will display the assigned scenario name.
12841284

From a CSV

If you are creating a DataTable from an imported CSV, you can add scenario names before or after importing into mabl:

  • Before importing: Add a column with a header called "Scenario Name" to your CSV file and define the scenario names as needed. When you import the CSV into the DataTables configuration page, that column will be imported into the Scenario Names column in the editor and used in the same way.
  • After importing: Import your CSV file into the DataTables configuration page. The Scenario Names column will appear first and be empty. Define the scenario names in the mabl app.

Viewing scenario names

When you run a test that has an associated DataTable, scenario names will be displayed on the Plan Details page, the Test Results page, and the Test Variables view for a specific run.

Plan Details

Select Plans from the left-hand navigation and click on the specific plan to open the Plan Details page. You can find the scenario names by expanding a previous plan run in the "History" section.

10181018

Test results

Select Tests from the left-hand navigation and click on the specific test name to open the Test Details page. Select the "Results" tab to view the scenario name for each run.

23962396

Test Variables

When viewing the results of a specific test run that used a DataTable, you can view which scenario that test ran and its values by taking the following steps:

  1. From the Test Output page, click on "View all."
15161516
  1. Click on "View" to show all variables for this test run. The Test Variables view will show the specific data-driven scenario for this test run and its associated values.
15271527 15251525

Did this page help you?