Use the mabl Jenkins Plugin to automatically trigger mabl plans associated with a specific mabl environment and/or application to run as a build stage.
With the mabl Jenkins Plugin, you can:
- Run mabl tests in Jenkins pipeline projects or freestyle jobs.
- Fail your Jenkins build if the mabl tests fail. Optionally, you may set the build to continue on failure.
- View mabl test results in a JUnit report
- Expose mabl results in Jenkins using the Jenkins Junit plugin
Visit the plugin repo to get full details on the plugin, lodge issues, or fork and submit pull requests.
To set up the mabl Jenkins plugin, read the instructions here.
Configuring a Run mabl tests step plugin requires the following pieces of information:
CI/CD IntegrationAPI key - API key access is limited to workspace owners.
- Mabl application and/or environment of the plans you want to run
- Optional advanced settings include plan labels and test branches.
To create a mabl pipeline step, you need to obtain the environment ID and/or application ID for the plans you want to run.
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.
You can view plugin results in mabl or in the JUnit XML test output. JUnit tests are output to the
reports.xml file in your Jenkins build directory after the mabl tests complete.
You can expose mabl test results in Jenkins using the Jenkins JUnit plugin:
- Add a
Run mabl testsaction to your build
- Add a
Publish JUnit test result reportpost-build action to your build
- Configure the
Test report XMLsfield with
Do not fail the build on empty test results
After setting up the
Publish JUnit test result report post-build action, you can review mabl test results under
Test Result for each build.
report.xml includes information about the test case IDs associated with the triggered tests. This report can be used to integrate your mabl test results with a test case management tool. See the article on integrating with test case management tools for more information.
While test case IDs are present in the JUnit
report.xmlfile, the test results in the Jenkins UI do not reveal test case IDs.
Updated 2 months ago