Use the mabl/trigger-tests Orb to automatically trigger plans associated with a specific mabl environment or application to run in your CircleCI pipeline.
With the mabl/trigger-tests Orb, you can:
- Run mabl tests as a step in a CircleCI pipeline
- View mabl tests results directly from CircleCI
- Export the results as a JUnit report to external test case management tools
Setup
To access the mabl API, you need to create an API key in mabl and store it as an environment variable in CircleCI:
- In mabl, go to Settings > APIs and create a "CI/CD integration" API key. API key access is limited to workspace owners.
- In CircleCI, create an environment variable called
MABL_API_KEYand set it to the value of the "CI/CD integration" API key that you created in mabl.

Configuring the API key environment variable in CircleCI
You may need to change the CircleCI security settings to allow the use of third-party Orbs. You can update this setting in the Organization settings menu.

Allowing third-party Orbs to be used in your organization
Add the trigger-tests Orb
Visit the trigger-tests Orb page for instructions on adding the Orb stanza to your project configuration. The trigger-tests page lists all the configuration parameters, including environment, application, plan labels, test branch, and browsers.
At a minimum, the Orb stanza should include the following:
- The name of the environment variable that holds the mabl API key:
MABL_API_KEY - The application ID and/or environment ID of the mabl plans that you want to trigger. See the article on mabl resource IDs for more information on obtaining these IDs.
Optionally, you may provide plan labels for the labels parameter to run a specific subset of plans.
Note
Only enabled plans configured to run on deployment are triggered by a deployment event. If a plan is disabled or lacks a deployment trigger, it does not run as part of a deployment event.
Results
To test that the integration is working, trigger an execution in CircleCI. After the tests complete, you can inspect the results in the "Tests" tab. You can also find the JUnit XML results in the "Artifacts" tab.

JUnit test results file is available in the Artifacts tab
Reruns
When automatic plan reruns pass, the orb reports the job as passed.
Test case IDs in the JUnit report
After tests run, the orb's parse-results step generates a junit.xml report, which includes the test case IDs associated with triggered mabl tests. You can use this report to integrate your mabl test results with a test case management tool.
Note
While test case IDs are present in the JUnit XML file, the test results in the CircleCI UI do not reveal test case IDs.