Forum Discussion

djt's avatar
djt
Occasional Contributor
6 years ago

Name Mapping too big ?

Is there a max size for name mapping entries ?

 

I'm writing a comprehensive test suite against a .NET desktop app and as of a couple of days ago everytime I add to the name mapping either directly with the wizard or by recording a test it takes longer and longer to responds - sometimes as long as ten minutes

12 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    There is nothing that has a max value for the NameMapping.  However, there is something that can reduce NameMapping performance.  The Extended Find feature is a GREAT feature for occasional use... but if it is over-used, it CAN reduce performance.

     

    Something to change: Go to Tools | Options | Engines | NameMapping and turn of the "Use Extended Find whenevre possible" option.  This will prevent it's automatic use but won't prevent you from manually adding it.  This should help for additional mapping.

     

    For the stuff you already have mapped, in the Mapped Objects panel (the upper panel in the NameMapping editing form), if you pan right on any mapped object, there is a checkbox for "Extended Find".  If it is checked for an object, this is not ALWAYS a bad thing.  However, having that flag checked means that every time TestComplete needs to look up that object, it needs to do a search down the object tree until it finds it.  The more "Extended Find" you have turned on, the longer the mapping takes to update/record.  

     

    You can turn off that flag for any item but, when you do so, you'll need to map any parent objects that may have been "collapsed" by the Extended Find feature.

     

    I THINK you'll find that, as you remove unnecessary "Extended Find" triggers, your mapping will become more responsive.  This CAN get labor intensive to remove them so get your sleeves rolled up.  However, it does make for a better performing tool.

    • djt's avatar
      djt
      Occasional Contributor

      Thks for the detailed response

       

      1. Is the "tools - options..." settings a PC or project setting as I am sharing the name mapping file with a colleague who is working on other tests for the same app - we are building up a library of functions to share ?

       

      2. Not totally sure what you mean by you'll need to map any parent objects that may have been "collapsed"  ?  I have attached a typical part of my mapping tree view - maybe you can clarify

      Tks 

      Dave

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        1)  The tools option is a setting per PC workstation.  So, for each machine you want to reconfigure, you'll need to make the change.  There is a means by which you can export settings to a file and then import them on any workstation.  We use that in our company so that, when a new machine is deployed, we can easily configure all appropriate settings. See https://support.smartbear.com/testcomplete/docs/reference/options/exporting-user-settings.html

         

        2) In your screenshot, you have a Button object mapped with the Extended Find flag checked.  Let's say you want to uncheck that flag.  The assumption with that flag is that there may exist objects between TemplateDialog and Button.  The flag tells TestComplete to search the descendent tree of TemplateDialog to find Button, bypassing potentially "unnecessary" intermediate objects.  So, if you uncheck that flag, you will need to map all those objects from TemplateDialog to Button and then drag Button to the appropriate child position in that hierarchy.