My Certifications Visit Documentation Mabl Home Mabl Product Portal Mabl Login

Branching

Summary

Summary

Learning targets 🧠

In this video, you will see how to: 

  • Add branches to your tests
  • Compare branched versions
  • Control conflict resolution

Review our documentation: Branching Overview

Why is this important?

  • Our branching functionality allows you to make isolated changes to tests on separate branches and avoid impacting the master version of the test. Once ready, branches can be merged to the master branch.

Getting started

When to use branches

Branching is useful for several situations:

  1. Create new tests or make changes to existing tests for new functionality
  2. Experiment with tests and get feedback without impacting the master version
  3. Run different versions of the same test across different environments
  4. Promote tests throughout CI/CD environments

How to create branches

As tests are created, they are saved to the master branch by default. To save tests to a new branch, create a new branch from the trainer.

You can create a new branch directly from the web app and then launch a new test against that branch.

Tip: Determine the naming convention that works best for your team and use it consistently when creating new branches.

As you switch between branches in the trainer, you’ll be prompted to save, discard, or move your changes.

How to run branched tests

To run a branched test:

  1. Navigate to the test
  2. Choose the branch name from the dropdown
  3. Click Run Test

To run a plan on a branch:

  1. Navigate to the Plan
  2. Click Run on Branch and choose the branch you want to run against
  3. Click Run Now

Note: if a test within the plan does not have a version on the selected branch, it will run the master version of the test.

Merging branches

When you are ready to merge a branch:

  1. Navigate to the branch under the Tests --> Branches Page
  2. Click to Merge the appropriate branch

Merging a branch will merge any test changes or new tests to the master branch.

Important things to note

  • Any changes made to the master branch after a branch was created will be overwritten as branches are merged.
  • Be sure to communicate with your team as any Flows are updated on a branch as those updates will sync across all tests in master once merged. (Unfamiliar with Flows? Check out the Flows lesson!)
  • Reusable JavaScript snippets do not adhere to branching and will be updated across all test branches as they are updated. However, saving Javascript as "No Snippet" WILL adhere to branching and update to the specific branch only.
  • You cannot pick and choose what to merge, all tests and flows will be merged together.
  • There is no branch approval process, anyone can merge branches at any time.