0% Complete

Introduction

Before taking this lesson

Make sure you are comfortable with the following lessons:

  • mabl Application Introduction
  • mabl Trainer Introduction

Learning Objectives 🧠

By the end of this you will:

  • Know how branching in mabl works
  • Understand how to use, review, and merge branches

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

1. Any changes made to the master branch after a branch was created will be overwritten as branches are merged.

2. 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!)

3. 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.

4. You cannot pick and choose what to merge, all tests and flows will be merged together.

5. There is no branch approval process, anyone can merge branches at any time.

Recap

Reflect

Branching is a very useful way to better control your test versions and allow you to make necessary changes without impacting the master version of your test.

Bonus: Branches can be created and run against directly from the mabl CLI!

Help Doc: Branching

Feedback

Was this helpful?

Take this 2 minute survey to let us know how we can make mablU better!