improved

Run DataTable scenarios locally from the mabl CLI

We added new options for working with DataTables from the mabl CLI, making it possible to run DataTable scenarios locally right from the command line!

Try it out

To try out the new options, make sure the mabl CLI installed on your local machine uses version 1.57.1 or higher.

# Check the mabl CLI version
$ mabl -v

# Update the mabl CLI to the latest version
$ npm i -g @mablhq/mabl-cli

📘

Mabl resource IDs

The following CLI commands use mabl resource IDs. For more information on obtaining IDs for mabl CLI commands, check out this guide.

Run a specific scenario

To trigger a local run using a specific DataTable scenario, use the mabl tests run command with the --scenario-id flag:

mabl tests run --id <test-id> --scenario-id <scenario-id>

The --scenario-id flag takes the ID from a specific scenario, which you can obtain by running the following command:

mabl datatables scenarios <datatable-id>

The mabl datatables scenarios command returns a table with scenario IDs, names, and the date they were created.

Listing scenarios in a DataTable

Listing scenarios in a DataTable

Use the --output flag to return the scenarios in an alternate format, including "json" or "yaml".

Run all DataTable scenarios

To trigger a local run of all DataTable scenarios, use the following command:

mabl tests run --id <test-id> --data-table-id <datatable-id>

The --data-table-id flag runs a test once for each scenario in the DataTable in sequential order.

Learn more

Check out our documentation to learn more about DataTables and the mabl CLI.