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 are available in the JUnit XML format. This means that in addition to viewing the test results in the mabl webapp, 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:
- Collect the parameters from the mabl webapp to setup the Orb
- Setup an API key environment or context variable in CircleCI to allow access to the mabl application
- Add the trigger-tests Orb stanza to your CircleCI project configuration
- Execute your CircleCI pipeline
Gather parameters to trigger the appropriate test from the mabl webapp. 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 webapp.
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
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.
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
Updated 16 days ago