Continuous Testing at scale: The new mabl and Bitbucket Pipelines CI/CD integration

This blog is part of 12 days of CI/CD, a celebration of all things CI/CD. Click here for more content and stay up to date by following us on Twitter!


This post was written by Chou Yang, a brand and content marketer at mabl.


Today we’re excited to introduce the integration of mabl with Bitbucket Pipelines so DevOps teams can now efficiently build automated UI testing into the entire development lifecycle. The advantage of this new integration is rooted in a simple reality: in order to achieve the benefits of continuous delivery, you need fast, effective automated testing integrated throughout your development workflow. 

For teams that are releasing product updates often – weekly, daily or even multiple times a day – they are likely struggling with testing that takes hours to run or requires constant maintenance. As a result, it's nearly impossible for testing to keep up with the code deployments. However, once CI/CD and automated testing are tightly integrated, it enables a scalable rapid release cycle without sacrificing application quality.

"As a customer who uses Bitbucket Pipelines for CI/CD we’re very excited about the benefits of this new mabl integration. Utilizing mabl and Bitbucket together will speed up our feedback loop for new changes." – Joe Wong, Senior QA Engineer at Building Engines

With this new Bitbucket Pipelines integration, Atlassian and mabl users can easily shift testing further to the left and reap all the benefits of adopting DevOps. With Bitbucket Pipelines, development teams can ship quickly while mabl automatically tests builds for visual, functional and performance regressions on every deployment. This enables continuous testing as part of continuous delivery, reducing the time developers would have spent on tedious server configuration, context switching, and bug fixing – multiplying the productivity of the team.

Intelligent CI/CD pipelines

Intelligent CI/CD workflows can automatically make informed decisions (such as promoting or demoting a build) based on individual test output – decisions that once could only be done manually. The test result data is incorporated directly back into the workflow, enabling faster, more efficient pipeline management. By incorporating mabl test results back into the Bitbucket Pipeline, teams can detect regressions in every deployment, speed up MTTR (mean time to repair), and reduce the costs of technical debt. For example, you could use mabl's Pipe in concert with the OpsGenie pipe to trigger alerts when deployments to production result in failed mabl tests.

Easy setup and configuration

The mabl Pipelines integration has the ease of a native plugin, but with an innate ability to customize more complex workflows. You can store and manage your build configurations in a single bitbucket-pipelines.yml file and get started with only 7 lines of code, then with only 4 more to create a mabl pipe. There are no CI servers to set up, testing scripts, or grids to manage. Just enable Pipelines and plug in a mabl pipe to run mabl cross-browser test suites.

Keep your work in sync

With the new mabl pipe, you can keep your build statuses in sync with your test executions and results. You can use the mabl CLI to query your workspaces, applications, environments, and tests; run smoke and regression tests on deployment; and see deployment test results – all in the same workflow.

Using a mabl pipe with Bitbucket Pipelines

At the highest level, the workflow starts when you deploy code changes to an environment using Bitbucket Pipelines. With a mabl pipe action configured, end-to-end tests set up in your mabl workspace will be triggered and run in parallel in the mabl test cloud. If mabl discovers problems during the test runs, it will send the test results back to Bitbucket Pipelines where you can choose to stop the pipeline or promote the build. 

Setting up a mabl pipe

Set up a repo that uses a Bitbucket Pipeline. In our example pipeline, our .yml configuration file contains one step (the only step) that uses a mabl pipe. You'll need to retrieve the mabl Application ID and API key from your mabl workspace.

This is the pipeline output. You can see our pipe output at the bottom right with test results from our "Brookline Bikes" test plan containing 3 successful tests running on Chrome and a direct link to the mabl test execution logs where you can view step-by-step screenshots, visual changes, JavaScript errors and more.

Example test output in mabl (pictured below) contains the test suite run history.

Going into the test run history for an individual test run gives you step-by-step output including screenshots, DOM snapshots, test runtime, network activity, as well as visual changes and JavaScript errors, if any.

Look for more exciting updates from mabl and Bitbucket at Atlassian Summit in March 2020. Register here if you haven't yet. And if you want to learn more about how mabl can help you and your team enable continuous testing, check them out here: mabl.com