Forum Discussion

testbuilder's avatar
testbuilder
Contributor
5 years ago

What is the best branching strategy

Hi 

 

We are a team of 3 testers and we have been having merge conflicts in NameMapping files while checking in the code in Azure Repos

 

We usually try to avoid working on the same test cases to minimize the merge conflicts. but still we end up having some in name mapping and if that is not merged correctly that results in loosing namemappings on either of the teammates scripts and we have to re map them

 

what is the best branching strategy in our situation. 

 

1. Create branches for each of the team members in the team and  a main branch?

2. Creating branches for the specific feature we are automating (The way development is done sometimes)

 

What is the best branching strategy in general for automation.

 

Thanks in Advance

  • The team strategy we used to keep the name mapping straight is to only let one person check it in.   Once every couple of weeks or so, depending on how much work is being done, one person would collect name mapping files from everyone and use an empty project to merge them inside TestComplete.  Then that name mapping is passed back to everyone and they make a backup copy of their own file and then try their tests with the new one.  Once everyone is happy with the new one, it is checked in.   This was rotated amongst the team members so no one got stuck with it all the time.  This also served to make sure that no one's name mapping got changed without their knowledge.

     

     

  • Hi,

     

    I am third to Marsha after Benoit 🙂

    In general, test automation is a development process, so the generic development workflow should work for automation as well.

    The case is that NameMapping file should be treated as the binary one for all version control systems and should not be merged using their means.

    I heard several times that NameMapping merging provided by TestComplete works (and Marsha confirmed this on more time) but never heard that merging by any version control system provided a good result.

     

  • The team strategy we used to keep the name mapping straight is to only let one person check it in.   Once every couple of weeks or so, depending on how much work is being done, one person would collect name mapping files from everyone and use an empty project to merge them inside TestComplete.  Then that name mapping is passed back to everyone and they make a backup copy of their own file and then try their tests with the new one.  Once everyone is happy with the new one, it is checked in.   This was rotated amongst the team members so no one got stuck with it all the time.  This also served to make sure that no one's name mapping got changed without their knowledge.

     

     

      • BenoitB's avatar
        BenoitB
        Community Hero

        We dont use name mapping.

        We don't do testing with dev but we do test for final customer, far away of dev team.

        We use OOP approach with closure implementation.

        Every business method is an object of a parent object of the software tested.

         

        Sorry cannot help you but imho the Marsha_R way is the good one. Always reduce the complexity of the control to be done.

    • Vars01's avatar
      Vars01
      Occasional Contributor

      Marsha_R 

      Just a quick doubt related to Merging. I am facing conflicts not only in Name Mapping but also we have some more files like 

      DecisionNG.tcCfgExtender

      DecisionNG_Automation.mds.tcLS

       

      how should we work with these file.Should we merge this manually or with some tool and replace it and then try to push in version control? Can you suggest on the same

  • jr348's avatar
    jr348
    Contributor

    Marsha_R's  method is the only practical method I know about.  A few years ago we tried using adding TestComplete to a repo and it wrecked so much stuff we had to remove it.  If your project is coded, with no keyword tests, project variables and object mapping it should integrate OK.

     

    Adding a parameter to a keyword test for example will yield merge conflicts that require insider info on the structure of various files.  There's heavy use of Unique identifiers and things can get broken very easily.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I am third to Marsha after Benoit 🙂

    In general, test automation is a development process, so the generic development workflow should work for automation as well.

    The case is that NameMapping file should be treated as the binary one for all version control systems and should not be merged using their means.

    I heard several times that NameMapping merging provided by TestComplete works (and Marsha confirmed this on more time) but never heard that merging by any version control system provided a good result.