To help teams meet their testing goals, mabl includes a range of options for running plans. This article explains the different ways you can trigger plan runs in mabl, including how to…
- Run a plan ad hoc
- Run a plan on a schedule
- Run a plan in a deployment event
- Run individual stages in plans
- Rerun a failed plan run
Note
This article describes you to trigger plan executions in the mabl cloud.
In the mabl CLI, you can also trigger a local run of all tests in a plan with the --from-plan-id option: mabl tests run --from-plan-id. A local run is not the same as a plan run in the cloud. Cloud functionality, such as concurrency, stages, DataTable scenarios, shared variables, and credential overrides, are not supported locally. Refer to the article on triggering tests from the mabl CLI for more information.
How to run a plan ad hoc
Triggering an ad hoc plan run can be helpful when you want to make sure everything is working as expected. To trigger an ad hoc plan run, take the following steps:
- Click on Plans in the left-hand navigation menu.
- Locate the plan that you want to trigger.
- Click the play button in the far right column.
Alternatively, open the plan details page for that plan and click on the Run button. If the plan runs in more than one environment, the Run button opens the Configure plan run panel instead, so you can choose which environments to run. See configure a plan run.
Running a plan from the plan details page
Configure a plan run
To change settings for a single ad hoc run, such as the branch or the environments, configure the plan run:
- On the plan details page, click on the down arrow next to the Run button and select Configure plan run. On a plan that runs in more than one environment, clicking Run opens the same panel.
- Choose the settings for this run:
- Branch: the branch to run the plan on. For more details on branch runs, see the article on running tests on branches.
- Environment: check the environments to run. Under each checked environment, choose the web URLs, API URL, and build files to use. Leave every environment unchecked to run all the environments in the plan.
- Web URL override and API URL override: run against a URL that isn't configured for the plan's environments.
- Android mobile build file and iOS mobile build file: choose an existing build file or upload a new one.
- Credentials override: use different login or HTTP basic auth credentials for this run. Leave a field empty to use the plan's credentials. To create new credentials without leaving the panel, click Add credential.
- Route test traffic through my computer: available when you have a personal Link tunnel running.
- Click on the Run now button.
A test with its own test-specific credentials in the plan settings keeps using them, even when the run has a credentials override.
If your usage is measured in credits, the panel shows the estimated credits for the run next to Run now. The estimate updates as you change environments and URLs.
Choosing an environment in the Configure plan run panel
Ad hoc test runs
For more information on running a single test ad hoc, see the article on ad hoc test runs.
How to run a plan on a schedule
To run a plan in set intervals or at specific times on specific days, edit the plan and add a new plan trigger. See the article on scheduling tests for more information.
Adding plan triggers
Note
The timer and schedule triggers are not supported for branched plan runs. If you want to set up a recurring trigger for a branched version of your plan, use deployment events and check out the scheduling capabilities for your team’s CI/CD tool.
How to run a plan in a deployment event
Use deployment events to trigger a group of plans in your workspace that match a set of specific conditions, such as application, environment, or plan label. To run particular plans, you can also name them by ID. See the article on deployment events for more information.
In the mabl CLI, you can also trigger a plan run using mabl plans run-cloud: mabl plans run-cloud --id {plan-id}. This command creates a deployment event that runs only the plan you name. See Triggering tests from the mabl CLI for more details.
How to run individual stages in plans
If you want to run a single plan stage for troubleshooting purposes, take the following steps:
- Click Plans in the left-hand navigation.
- Click on a plan to open the plan details page.
- Click on the play button next to the title of the stage you want to run.
Running individual plan stages
How to rerun a failed plan run
Automatic retries
If the plan run was triggered by a schedule or a deployment event, you may configure the plan to automatically re-run on failure in the Advanced section of the edit plan page.
Manual retries
If a plan run was manually triggered and contains at least one failed or skipped test, you can rerun part or all of that plan run on the plan details page. Click on the rerun button next to that particular plan run, and select from one of the following options:
- Rerun all tests in this plan
- Rerun only failed tests in this plan
- Rerun failed and skipped tests in this plan
Rerunning a plan run with failed and skipped tests
Note on rerunning only failed tests
The option to rerun only failed tests works best for plans composed of independent tests that don't rely on any setup or shared variables from other tests.
For plans that contain tests with dependencies, rerunning only the failed tests can cause new failures because the rerun might not include essential setup from tests that passed during the original run.