levi_bryant
12 years agoContributor
Script Extensions that require Name Mapping files
Updating a script extension and then seeing those changes across all projects and test suites is easy.
I've incorporated objects that require Name Mapping inside my script extension. So any project that uses that script extension now needs its name mapping file updated to use the name mapped objects inside that script extension.
I created a master name mapping file just for that script extension and now when I need to use that script extension in a project i just merge that master name mapping file.
MY PROBLEM:
The main problem is that every time I add a new name mapped object inside my script extension I now have to go to each one of projects and re-merge the newest version of my master name mapping file for that script extension.
MY QUESTION:
Is there a way to share a master name mapping file across all projects similar to how script extensions work?
As it stands it seems like script extensions are best used without name mapped objects. This is not ideal though as name mapping is almost required to have robust scripts that don't intermittently fail.
Thank you so much,
Levi Bryant
Hi Levi,
As far as I can see, you've contacted the TestComplete Support team. Here is their reply:
You can simply share a NameMapping project item with several projects (even if they belong to different project suites). Please see the "Sharing Project Items and Their Child Elements Among Several Projects" help topic (http://support.smartbear.com/viewarticle/32430/). So, it will allow you to have only one NameMapping file stored in a shared folder for all your projects.
But, please note that the situation when you use NameMapping in script extensions isn't typical. Script extensions are convenient for the creation of utility functions which can be used in different projects, but NameMapping, as you mentioned, makes these functions dependent, and in every project you will need to think about providing the needed condition for their work. Since every object in TestComplete can be addressed by its full name, you can make your script extension more reliable by avoiding using Name Mapping.
The following help topics can be useful:
"Default Object Naming" -- http://support.smartbear.com/viewarticle/28459/
"Find Method" (and topics from the "See also" section) -- http://support.smartbear.com/viewarticle/30995/