The mabl bot application allows you to run GitHub checks as part of your GitHub pull requests (PRs) and commit checks. With mabl GitHub checks, you can:
- View the results of a mabl deployment event directly from GitHub
- Require that the test check passes before a GitHub PR can be approved and merged
- Allow pull request reviewers to manually re-run mabl tests from GitHub
Mabl GitHub checks make it easier to get feedback earlier in the development process to ensure code changes don't introduce regressions
To get started, follow the instructions outlined in the GitHub integration setup article.
Configure integration settings
On the GitHub integration page, toggle on "Run GitHub checks on deployment."
If you want to allow pull request reviewers to manually trigger mabl test re-runs from GitHub, toggle on "Allow manually re-running GitHub checks."
Configuring integration settings
Run mabl tests
To review the output of mabl tests as a GitHub check, you must trigger a mabl deployment event and associate the deployment event with the code revision hash:
A deployment event is a parallel run of all plans in a workspace that match the specified conditions, such as application, environment, and plan label.You can use one of the following methods to trigger a mabl deployment event:
mabl deployments createcommand in the mabl CLI
- A CI/CD integration
- The Deployment Events API with a
Code revision hash
To connect the mabl deployment event to a GitHub check, you must pass the value of the code revision hash, also known as the GitHub commit hash.
You can obtain the hash from the commit details in GitHub. Copy anywhere between the first seven or all characters of the hash.
Obtaining the code revision hash
For example, the following mabl CLI command triggers a deployment event and associates the deployment event with a specific code revision hash:
mabl deployments create -a <application-id> -e <environment-id> --revision <code-revision-hash>
Review check details
When the deployment event runs, a mabl GitHub check appears for the commit ID, first as pending, then as successful or failed. Click on the Details button to review:
- A list of all plans and tests that ran as part of the check
- The status of each test run: passed or failed
Click on a test name in GitHub to review the complete test run output details, including screenshots, DOM snapshots, and network activity for troubleshooting purposes.
GitHub check details
If your team enabled the GitHub integration to allow manually re-running GitHub checks, you can click the Re-run button to run the tests again.
Updating a GitHub check
If you want to run additional mabl tests and associate them with a GitHub check before merging the PR, trigger a new deployment event and pass the value of the code revision hash for the latest commit in the PR.
Obtaining the code revision hash from the latest PR
To accomplish this in the mabl CLI, for example, use the mabl CLI command
mabl deployments create and pass the hash as a value to the
The results for these additional test runs appear as a new mabl GitHub check.