Forum Discussion

almmatt's avatar
almmatt
Contributor
9 years ago

Git NameMapping Merge Issues

We recently started using Git as our source code control within TestComplete. We have about 4 people working on local copies of the project who then merge their work with Git. We have problems with our NameMapping file not merging properly when using this method. We are losing mapped items that were previously committed and part of the master trunk.

 

We use Git and TortoiseGit. There are typically no merge issues reported from the automatic merge process that takes place when we do a pull (after committing our local changes). Has anyone else experienced this problem? Is there a recommended way of working with NameMapping to prevent this from happening?

 

Thanks.

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    To make a long story short: automatic merging for TestComplete projects (like for almost any other software project) does not work and the recommended way is to merge manually. Preferably - by some dedicated person(s).

    It is possible to make automatic merge to work, but (again, as with practically any other project) this requires any project item to be changed by no more than one person at the time.

     

    If you like a long story, you may try to search for something like 'NameMapping merge' on the entire TestComplete forum and go through the threads.

    • almmatt's avatar
      almmatt
      Contributor

      As a team, we only modify scripts and keyword tests one person at a time. The only overlap that occurs is when someone has to map a new object, add a new script, or add a new keyword test. The problem lies in the files TestComplete uses to keep track of the files on disk. Is there any type of documentation on merging files such as the NameMapping.tcNM, Scripts.tcScript, KeywordTests.tcKDT, etc.

       

      Why doesn't TestComplete just look for files on disk instead of maintaining a database of which files are in the KeyWord Tests folder? I feel like they definitely took the hard way in that regard.

       

      Is there any documentation on how these files' schema so we can intelligently merge manually?

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        I think that TestComplete does not use files from some subfolder because a) not all of them may be required for the given project but may belong to another one; and b) because it is possible to use files that are located outside of the folders structure of the current project (usually these are the shared library files).

        There is no officially documented structure for either project files or namemapping one and their manual merge is not recommended. For some files the internal structure can be guessed, but you will merge on your own risk.

        TestComplete can merge two namemapping files (see help for the details of the process), but according to the messages from others the merge results require manual cleanup quite often.

        Personally I never used automated merging and our teams always used manual merge from local projects into the main one. (Yes, this is inconvenient, but reliable.)