Also have a look at
- How to integrate the AB testing methodology into the current automation framework
- Help - How do you organize your Test Methods in Selenium?
If it was me. I would disambiguate the AB testing problem from the branching problem. The latter problem is very easy to solve, you put all the test code into the same repo as the product code. Job done on that one… Not always easy, but that’s how you solve it. AB, is another animal, totally separate problem.