Forum Discussion

RadGuru's avatar
RadGuru
Occasional Contributor
11 months ago

Name Mapping merge conflict

we are 3 team member and we are new to Keyword test. We are working on same project suite cloned from git master. We are having merge conflict every time we try to pull latest code from master to our branch which is expected since we are using same keywords, Regions and Name mapping. Is there any way to avoid merge conflict? It is easy to resolve merge conflicts for Keyword and Regions, but difficult for Name mapping.  Can anyone suggest if we cannot avoid merge conflict, then how to resolve it? We tried to resolve it and were able to merge on master branch, then when we pull latest code, our test are not running, it says object was not found. We have to revert back our code 3 times from master and rewrite test again.

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    A variation of the approach mentioned by Marsha is to commit NameMapping as soon as it was changed, and notify others so that they can pull new file before they change something in their local copies.

     

    P.S. Merge is a price that you are paying for the possibility to use local copy of the sources. Merging always is risky and dangerous because there is always a chance that automatic merge will do something incorrectly. So the more often you will commit, the safer you and others will be. (Note, that it is quite OK to commit the code that is not final but intermediate not working yet. Just make sure that this code will not be called/executed until you complete it.)

     

    • RadGuru's avatar
      RadGuru
      Occasional Contributor

      Thank you Alex. Will share this with team

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Here's how we did it with 3 people working on related areas:

     

    Every two weeks, one of us would take the name mappings from the others and merge them inside TestComplete in a sandbox copy of the project and resolve the conflicts. Then all three would try and run their tests with the new name mapping and we would resolve any remaining problems.  That group copy is what got added to the git master. 

     

    Pick the time period that works for you. We traded the job around between the three of us so that no one person got stuck with it every time.