High-velocity DevOps teams rely on branches and version control to safely and effectively collaborate across products, projects, and teams. In mabl, you can create new versions of tests and flows on branches to make isolated changes to tests and flows without impacting the core testing suite or interfering with each other’s work.
For those that are familiar with branching using git, it is important to note that branching in mabl works differently and is centered around managing versions of tests and flows.
How branching works
In mabl, branching is designed to allow working with different versions of specific tests and flows. When you create a branch, only versions of tests and flows that are saved to a branch live on that branch. To explicitly add a test or flow to an existing branch, save a new version on the branch.
Version control
As you create and edit tests and flows, mabl tracks changes through version numbers. You can review the version history for a test or flow by clicking on the Change history tab.
Test and flow metadata, such as the name, description, and labels, are not version controlled. Updating this information affects all versions of the test.
Viewing version history for a branched test
Branched tests and flows in mabl don’t have independent version histories. Every change to a test or flow increments the version globally, regardless of the branch. Because of this, you cannot view a test or flow’s revision history by branch. The versions represent saved versions of a test or flow in sequence from either the master branch or the development branch.
Deleting tests and flows
If you delete a test or flow, it will be deleted across all branches. You can restore an accidentally deleted test or flow within 30 days of deletion from the Activity feed: Settings > Activity feed.
See the article on running tests on branches for instructions on how to prevent a test or flow from running on a particular branch.
Test execution
If you run a test without specifying the branch, mabl executes the latest version of the tests and flows on master.
When you run a test on a branch, mabl executes the latest version of the test or flow on that branch. If a test or flow is not on the branch, the latest version of the test or flow on the master branch is executed.
Merging changes
When merging a mabl branch into master, you can resolve step and variable conflicts ahead of time to avoid unintentionally overwriting changes that have been made on master since the mabl branch was first created.
Branching limitations
- Reusable snippets do not adhere to branching. Updating a snippet on one branch updates the snippet across all branches where that snippet is used. To manage a snippet on a branch, save it as a one-time snippet and put it in a reusable flow.
- There is no support for branching visual tests.
- API tests do not support conflict resolution.
- On the mabl Desktop App, you can only merge branches into master. In the mabl CLI, you can merge a non-master branch into another non-master branch, but there is no merge conflict resolution. See managing branches for more details.
Learn more
To learn more about branching, check out the following articles: