Forum Discussion

r_ahmakov's avatar
r_ahmakov
Occasional Contributor
8 years ago

Global Name Mapping

Hi,

 

I am struggling with the following issue:

 

I have several Project Suites with several Projects and many KeywordTests and I want to have a global name mapping, so I can easily change object names or properties in just one project. "Merge with" is a great option, but the same object is mapped differently in the different project:

 

Project1: NameMapping.Sys...TTabSheet.PageA

Project2: NameMapping.Sys...TTabSheet2.PageA

 

and after merging I have to many objects with conflicts and I have to update all keywordtests...

 

Name Mapping Templates does not work as well (https://support.smartbear.com/viewarticle/76306/  - Do not create name mapping templates for the Sysobject. TestComplete maps this object automatically and ignores any template defined for this object.)

 

I would appreciate any suggestions or ideas… :)

7 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    A possible option is to manually reference a common Namemapping file from all your test projects.

    Steps:

    -- Exit TestComplete;

    -- Create a backup ;) ;

    -- Create (or choose) a folder for the shared NameMapping file;

    -- For every project (.pjs) file, open it in the text editor, search for the 'NameMapping.tcNM' string, replace the relative path with the new relative (or absolute, but this might be less portable) path to the shared folder and save the changes;

    -- Open test suite in TestComplete. If the shared folder is located outside of the folder where the given project file is located, a small 'shortcut' glyph should be added to the Namemapping element for this project.

    • r_ahmakov's avatar
      r_ahmakov
      Occasional Contributor

      Thanks,

       

      it is a very promising solution :) but if I change something in the "globalNameMapping" file will TC be able to change/update all KeywordTests that are sharing the same NameMapping file?

      • mgroen2's avatar
        mgroen2
        Super Contributor

        r_ahmakov if you make this clear in the feature request and motivate it they might build it ;)

         

  • mgroen2's avatar
    mgroen2
    Super Contributor

    r_ahmakov you can create a feature request for TestComplete to better support global namemapping. And hope that a lot of people vote for it so it gets implemented in future version.