The branch feature allows you to add and verify changes in a private workspace without affecting test cases or their executions managed across the entire project. This feature enables safe and efficient collaboration within teams.
Currently, this feature is available exclusively for Enterprise Plan customers. It will be released for Standard Plan customers simultaneously as its official release.
The following features are not yet supported but are under development for the official release:
- Creating new test cases and shared steps within branches
- Resolving conflicts intuitively through a dedicated interface
Table of Contents
1. Use Cases for Branches
- Fix and execute failed test cases in a personal branch without interfering with others' work
- Test upcoming features in the
develop
branch and merge them into themain
upon release
2. How to Use Branches
A branch is an independent workspace created under a project. It allows you to make and test changes without impacting other branches.
In MagicPod, all projects are managed with branches. Even if no explicit branch is created, the project's resources implicitly exist within the main
branch, referred to as the default branch.
Changes validated within a branch can be merged into the default branch when ready.
2-1. Create a Branch
To create a branch, go to a page under your project and click the branch icon in the upper-right corner.
After creating a branch, the menu will update, and you will automatically switch to the newly created branch.
In the branch list, you will see the newly created branch along with the default branch. The default branch serves as the primary workspace for the entire project, and you can toggle between branches depending on your workflow.
This setup allows you to edit and execute test cases and shared steps without affecting the default branch.
Please note that new branches can only be created from the default branch. For example, you cannot create the branchB
from the non-default branchA
.
2-2. Edit Test Cases
Within a branch, you can edit test cases and shared steps as usual. Ensure you're editing the correct branch by checking the branch name displayed in the upper-right menu.
You can review the list of test cases and shared steps edited within a branch on the branch details page. Click "Branch details / merge" in the upper-right menu to access this page.
You can view individual changes from the "View Changes" menu.
The following features are unavailable in branches:
- Creating new test cases or shared steps
- Not available in the beta version, but we are actively developing it to make it available by the official release
- Editing test case names or descriptions
- Viewing UI usage counts
- Reviewing test cases using deleted UIs in the list
If the upper-right menu is not available on a page, the content is shared across all branches. For example, updates to the following resources will apply to all branches:
- Batch run settings
- Test case labels
- Multi-lang data patterns
- Visual diffs
2-3. Execute Test Cases
Branches support both single and batch runs of test cases.
For the single run, the execution method remains unchanged. Execute a test case from the lower-left corner of the test case edit page. Switch branches via the upper-right menu if needed.
For the batch run, you can select a branch before execution begins. After clicking the "Run new batch" button, a branch selection screen will appear before the batch run starts.
You can also specify the branch for command-line batch runs. Refer to the MagicPod Web API page for details on the request format for POST /v1.0/{organization_name}/{project_name}/batch-run/
. The request format can also be checked via the "Run from command line" menu in the batch run settings.
2-4. Merge Changes
Once edits and executions are complete, merge your changes into the default branch. Access the branch details page from the upper-right menu to review the list of changes.
If you find unnecessary or unintended changes, discard them via the menu next to each change row. This will revert the resource to its pre-edit state on the branch. If a change is discarded by mistake, you can restore it to a previous version from the history page.
After reviewing all changes, click the merge button to complete the process. Providing a meaningful merge comment helps other team members understand your changes.
Note: Once a branch is merged, it is closed, and no further changes or test runs can be performed in that branch.
- Test cases
- Shared steps
- UIs used in test cases and shared steps
- Data patterns
2-5. Resolve Conflicts
Conflicts occur when the same test case is edited in both the default branch and another branch. A branch with unresolved conflicts cannot be merged. Since such conflicts cannot be resolved automatically, manual resolution is required.
Conflicted resources are flagged on the screen. Open the "Resolve Conflict" menu for guidance on resolving them.
In the above case, a conflict occurred because different changes were made to the test case in both the main
and develop
branches. First, click the two links displayed on the screen to review the changes made in each branch.
Changes within main
:
Changes within develop
:
Upon reviewing the changes, you will find that in the main
branch, a process to wait until the button is displayed was added, while in the develop
branch, the command was modified from a simple click to a specified-position click. Considering these changes, it seems appropriate to combine them, as shown in the image below. Then, manually apply the changes from the main branch to the develop branch and edit the develop
branch to reflect the correct state.
Once editing is complete, return to the branch details page and mark the conflict as resolved.
Currently, resolving conflicts is a time-consuming process, so we recommend operating in a way that minimizes the likelihood of conflicts occurring. We are actively developing a more intuitive interface for conflict resolution, which will be available by the official release of the branch feature.
3. Supported Versions
When creating and executing tests in a local environment using branches, please update MagicPodDesktop to version 1.19.0 or higher. You can download the latest version of MagicPodDesktop here.
No update is required if you are using a cloud or external cloud service as your test execution environment.
4. FAQ
Q.
After switching branches, I see a "Page Not Found" error. Why?
A.
This error occurs if a resource exists in main
but not in develop
. For example, switching from main
to develop
while editing a test case exclusive to main
will result in this error.
To avoid this issue, switch branches from the test case list or a similar shared page.
Q.
Why are similar shared UIs sometimes created after merging a branch?
A.
In rare cases, merging creates two shared UIs (e.g., "UI1" and "UI1(1)"). This happens when:
- A test case in
main
uses "UI1" - Create
develop
branch, and "UI1" is edited indevelop
- A new test case in
main
also uses "UI1" -
develop
is merged intomain
To ensure proper functionality, the system creates a new shared UI to differentiate between the test cases. This prevents unexpected behavior in test executions.