Training data-driven journeys

Supplying the variables in a journey

You can add data-driven variables to your journeys via the {x} variables icon in the bottom toolbar of the mabl Trainer. To create a variable, click on Create and select to set the value of the variable from a data source, which will be the associated DataTable.

Create a variable for data-driven testing

Create a variable for data-driven testing

You can also create and mange your data-driven variables by clicking on Manage, instead of Create, which will display all data-driven variables for the journey with their default values and an option to add more such variables. All environment and system-generated variables are also displayed on that screen in read-only mode to prevent naming conflicts with data-drive variables you create.

Manage variables for data-driven testing.

Manage variables for data-driven testing.

When creating data-driven variables, you must assign a default value which will be used in case there isn't any value passed on to the journey for that variable from an external source such as a DataTable.

You can use data-driven variables, just like any other variable as for example:

  • in assertions
  • as input values
  • as URL's to visit
  • in template strings to generate other variables
  • in custom JavaScript steps

Editing default variable values

When you go to manage variables in the Trainer, you can update the 'default' values of the data-drive variables. Please, replay the journey in the Trainer to make sure everything works with the updated defaults.

Data-driven variables

In order to ensure that your variables are being properly overridden in data-driven tests, you want to make sure that you supply a list of all the variables your journey uses and their default values.

When you save the journey, you will see all data-driven variables used in that journey on the journey details page as shown on the image below.

Journey details with data-driven variables.

Journey details with data-driven variables.

You can easily create a DataTable table based on those variables by clicking the GENERATE DATATABLE button, which will take you to the DataTable editing screen where you can add different scenarios to test.

Alternatively, you may want to first create a DataTable and then associate it with the journey.


Training data-driven journeys


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.