CircleCI integration

Integrate your mabl tests directly into your CircleCI pipeline. You can use the trigger-tests Orb to automatically trigger specific environment or application plans to run as a deployment task. The report of the tests is available in the JUnit XML format. This means that in addition to viewing the test results in the mabl app, you can inspect them directly in the CircleCI interface and you can also import the test results into external test reporting tools.

To use this integration, follow these steps:

  1. Collect the parameters from the mabl app to setup the Orb
  2. Setup an API key environment or context variable in CircleCI to allow access to the mabl application
  3. Add the trigger-tests Orb stanza to your CircleCI project configuration
  4. Execute your CircleCI pipeline

Collect the Parameters

Gather parameters to trigger the appropriate test from the mabl app. The Deployment Events API documentation shows how to craft a deployment event using the command line. The same values displayed in the generated command-line can be used to configure the CircleCI Orb parameters as well.

As a minimum, you will need a CI/CD type API key, and an Environment or Application ID to trigger test runs in mabl. All of these parameters are available on the Settings->APIs page in the mabl app.

Configure the API Key

To access the mabl APIs, you need to configure an environment variable configured in CircleCI. For example, set the value of the environment variable called MABL_API_KEY to your key.


Configuring the API key environment variable in CircleCI

Add the Orb Stanza to the Project Configuration

First, you may need to change the CircleCI security settings to allow the use of 3rd-party Orbs. You can find this menu under Organization Settings.


Allowing 3rd party Orbs to be used in your organization

Next, visit the trigger-tests Orb page to learn how to add the stanza to your project configuration. On this page, you can also find all the configuration parameters that the Orb supports. Make sure that you provide the name of the environment variable that holds the API key.

Execute your CircleCI pipeline

To test that the integration is working, trigger execution in CircleCI. After tests completed, you can inspect the results in the Tests tab. You can also find the JUnix XML results in the Artifacts section.


JUnit test results file is available in the Artifacts tab