cancel
Showing results for 
Search instead for 
Did you mean: 

Name Mapping too big ?

djt
Occasional Contributor

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 12
Community Hero

Re: Name Mapping too big ?

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
djt
Occasional Contributor

Re: Name Mapping too big ?

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

Community Hero

Re: Name Mapping too big ?

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.  


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
djt
Occasional Contributor

Re: Name Mapping too big ?

Thanks mate

 

2. Sounds like a lot of work and potential for some failures in my tests - think that needs some thought....

 

Cheers

 

Dave

Community Hero

Re: Name Mapping too big ?

It is a lot of work.  However, it's worth it in the end.   As for potential failures, some tips on how to do it.

 

1) Turn off the option as mentioned before

2) Go to the screen with "Button" (using this as an example again)

3) In the NameMapping, right click on Button and select "View in object browser"

4) In the object browser, right click on the object that is the immediate parent of Button

5) select "Map current object"

 

You will be prompted at that point if you want to map all the objects in the tree including the current one.  Say yes.  And then follow the dialogs and prompts to generate mappings for each object.

 

6) Back in NameMapping, drag Button to be a child its immediate parent.

7) In Aliases, you will have Aliases now for all those newly mapped objects.  You can right click on them and select "Exclude" to keep them out of your aliases.

 

And yes, this is a lot of work.  What you might want to do is schedule this work in pieces to spread it out.  Functionally, your tests will work fine with Extended Find turned on.  Your task at this point is performance improvement which can be spread out over time.  Again, it's worth it in the end.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
djt
Occasional Contributor

Re: Name Mapping too big ?

Okey, dokey - indeed a mamoth task as I have 400 mapped items with that field checked ! ! 

In step 4 I have the option to map the objecy or the child objects

If I chose object I don't get  a prompt to map all teh objects in the tree - only a dialog asking me how to name this one 

 

Maybe we are on different versions ?  I have 12.60.5545.7 

Community Hero

Re: Name Mapping too big ?

Same version.  If there's only one intervening object between TemplateDialog and Button, you won't get an additional prompt.  If there are multiple objects, then you'll be prompted.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
djt
Occasional Contributor

Re: Name Mapping too big ?

There are multiple parents - the button is in a grid, in a group box, in a text panel, etc, etc..

 

See capture2.png

 

 

Community Hero

Re: Name Mapping too big ?

Right, so in that example, you would right click on the WPFOBject('Grid', '', 1) that is the direct parent of the desired button.  Select "Map Object".  If you have that Tools option turned off, after making that selection, you'll get a prompt indicating that the GroupBox, StackPanel, Grid, and additional template dialog need to be mapped as well.  Acknowledge that and you'll then be instructed to map ALL the objects, assuming they don't already have a mapping somewhere.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors