You can see a list of all your development branches if you navigate to the Tests > Branches tab in the mabl app. From there you can do the following actions:
- View branch details
- Compare a branched test version with the main version
- Resolve conflicts between the branched test version and the main version, including test and flow step changes, as well as test data-driven variables, flow data-driven variables, and flow parameters
- Merge a test branch into master
- Delete a branch
Clicking on a branch in the Branches tab brings you to the Branch Details view, which provides a summary of the tests and flows on the branch as well as critical information, including:
- The current version of the development branch along with the author and timestamp
- The current version of the master branch along with the author and timestamp
- Steps changed on the development branch compared to the master branch.
- Warning of potential conflict if changes have been made on master since branching off.
The compare and conflict resolution views are not available for API tests.
To compare two versions of a test or flow in a test branch and master, go to the Branch Details page for a specific branch and click on the change count (under the Changes column) for the test or flow that you want to compare.
Steps will show up in red on the left if they do not exist on the test branch, and will show up green on the right if they do not exist on the main branch. Steps that exist in both versions show up as white steps and cannot be removed.
If updates have been made to the master branch of a test or flow since the last version on the test branch was saved, a red icon will appear in the conflicts column. Clicking on the red icon opens up the conflict resolution view, where you can decide which steps, variables, and parameters you want to keep and create a new version on the test branch. That way, once all conflicts have been resolved, you can safely merge the new test branch version into master.
If either the master or the branch version of a test or flow was saved prior to March 27, 2022 there is insufficient information to determine whether it is safe to overwrite the master with the branch version. Therefore, a red ! icon is shown to indicate possible conflict. The version info underneath name of the test or flow would also be missing the description "Branched from version ... on master". Follow the steps in this section to safely reconcile the changes between the versions.
The conflict resolution view appears as a three-columned table with the following sections:
- Master version: steps appear in red if they don't exist on the test branch.
- Space to create new version
- Test branch version: steps appear in green if they don't exist on the master branch.
Steps that appear in white exist in both versions and cannot be changed
The variable and parameter cards show a list of all variables or parameters combined from both versions, with tags indicating where they came from. A Value conflict message indicates that a variable or parameter exists in both versions but has a varying default value. You can select and deselect which variables you'd like to use in the new version using the checkboxes. Value conflicts must be resolved to continue.
When you're satisfied with the steps, variables, and parameters selected in the center column, click Review to check over the final version. You may return to the previous editing page and make changes if you want to change anything. Otherwise, if everything looks correct, click "Save" and a new version will be saved to the test branch!
Merging with conflicts
If not all conflicts have been resolved and you continue with a merge, the test version of conflicting steps and values will overwrite the master version.
To merge a branch into master, use the Merge button on the Branch Details page. If you have no conflicts on your branch, you will see the following confirmation:
If you try to merge a branch that has potential conflicts, you are presented with a warning modal with the suggestion to resolve conflicts. If you choose to merge anyway, the steps and values from the test version will overwrite the master version.
- You can only merge a branch into master and cannot choose a different branch to merge into.
- You can merge a branch from the mabl CLI with the command
mabl branches merge. However, unlike the desktop app, the mabl CLI does not check for merge conflicts and overwrites the master version if there are any conflicts.
Sometimes the merged version of a test or flow will result in unintended consequences and you will need to revert to a previous version. Since tests and flows are independently versioned in mabl, it is not currently possible to reopen all of the tests and flows on a branch in the previous version. If you do need to restore a test or flow to an earlier version, you can take the following steps:
- Navigate to the Details page of the test or flow that you wish to revert.
- Click on the "Change History" tab.
- Select the older version that you wish to revert to.
- Click on the "Save as latest version" button. This action effectively creates a new version of the test or flow that contains the same information as the desired version. This process must be done separately for each merged test and flow that you wish to revert.
After a branch has been merged into master, it will still appear on the Branches page. To delete a branch, you can click on the Delete icon.
Deleting tests and flows
If you delete a test or flow, it will be deleted across all branches.
- You can restored an accidentally deleted test or flow from the Activity Feed. (Settings > Activity Feed).
- If you want a test to stop running on a specific branch (but continue running it on others), you can go to the Test Details page, select the branch you'd like to stop running this test on from the branch dropdown, and turn off the test using the toggle. This action prevents the test from running on the selected branch.
Updated 7 months ago