For many teams it is essential to work with different branches at same time so the main repository stays stable while development can still progress at a fast rate. Developers can create their own branches from the trunk/baseline and work independently on it.
This creates a few problems when it comes to testing:
1. With the changes that occur in branch, some test cases are affected too and needs to be changed.
2. Multiple branches means maintaining multiple copies of a test case.
3. Testing individual branches requires a tester to refer to the updated list of test cases only.
4. Some branches will be merged to trunk/master sooner than later, that means at some point you will be merging these updated test cases to the trunk/master.
In this article we'll describe how to solve these problems step-by-step.
Maintaining multiple copies and changes of test cases
To get started, you should have all your test cases in the trunk created in Test Collab as shown below. We'll take a sample project as example here to make things clear.
Then create a new suite named 'Branches' where you'll store different branches your team is working on.
Now a branch will affect several test cases as it is actively developed. Say, our branch 'My first branch' affects all test cases in 'Clients' suite in different ways.
To manage this, you can simply copy whole test suite 'Clients' under 'My first branch'.
Now you have a copied suite with title 'Clients' under 'My first branch'. This can be done for individual test cases as well. Also you can create more than one branches and have multiple copies of test case and suites.
After this is done, you can now proceed to make changes in your test cases independently in different branches. A change in test case or addition of a test case will live only under than branch and is completely independent of baseline or other branches.
Testing Individual Branches
After you are done with managing the structure and copies of test cases in different branches, you'll eventually need to execute these.
You'll need to: a) test trunk/master, b) test individual branches
Testing trunk is simple:
To test a different branch, you'll need to select the suite under the branch name instead of first-level suite. In this case, 'Clients' suite.
Rest of the test execution process will follow. More details here
Merging the test case changes after branch is merged
Currently there is no way of automating the merge function and this must be done manually. We recommend opening the test case in multiple windows and compare them side-by-side.
Once you figure out the changes to make. You will need to update the test case (Edit link on test case view) at the baseline as indicated below:
After changes are done, you can see the updated test case with change log:
You can also run a side-by-side diff to see what was changed.