biswadash's avatar
Occasional Contributor
7 years ago
New Idea

Automating the Name Mapping property

Presently, the process of choosing an element and providing a unique identification to the element is done manually. Along with the element identification the mapped objects are shown in a unreadable format like "pageEmailaccountinfo" so, renaming the mapping with a suitable name also done manually. It will be a great idea If the process of renaming the mapping and choosing unique identification is automated. Moreover, by automating the process it will save more time for tester's to concentrate more on testing rather than on name mapping.


It will be a pain to maintain the name mapping manually when there are several elements on the page to be mapped.


  • tristaanogre's avatar
    Esteemed Contributor

    There is the concept of NameMapping templates which allows you to have the automated mapping select a particular set of properties based upon what "class" of object it is that you're mapping.  That should help with the identification.


    The problem with naming... what naming convention are you using?  Are you doing camelCase? Or PascalCase? How do you want to pre-pend your names?  Do you? With what?  What determines it? etc... this is where things get VERY strange because no-one does things EXACTLY the same way.


    This brings back to some best practices that were discussed at the Connect conference a couple of months ago.  Basically


    1) Do not depend upon automatic mapping.  Do the mapping yourself.

    2) Map all components prior to recording

    3) Have a single point of contact (person) responsible for maintaining and creating the mapping.  


    While having TestComplete automatically map things is a good starting point, I have yet to have a project in which I've worked where I've depended upon that automatic mapping, even when using template.  You will need to at least adjust your Aliases so as to be more compact.  Additionally, you will need to adjust your property values to account for any dynamic identifiers (using wild-cards, conditional mapping, extended find, etc).  Since you'll be doing these things ANYWAYS when mapping automatically, you might as well rename things manually as well.  All part of good development.

  • biswadash's avatar
    Occasional Contributor

    Thank you for your reply. I am aware of the templates used in the Name mapping but, my concern is for each and every element the mapping will be done manually. I was wondering If the process can be automated as we don't have enough workforces where we can assign the mapping to a particular person. I have been doing the object mapping but with every element I need to specify the unique Id which takes more time. To save some time I was thinking If this feature can be provided.


    Regarding the naming conventions I mean using a meaningful name for the mapped objects. The issue here is about meaningful name which be readable where as I have no issues with the name convention like camelCase. As per my organization I think automating this process will save time and will increase the usability for the tool.

  • Marsha_R's avatar
    Champion Level 3

    I agree with tristaanogre.  You can use some of the automated features to get going, but you really need to adjust the mapping for your particular usage and nomenclature. 


    "pageEmailaccountinfo" may be unreadable for you, but I know my product field names well enough that I can use that just fine.  How would TestComplete know what everyone considers readable?  And in all the different languages that we use?  Remember that TestComplete is a generic tool that's used in many different environments and for many different products.  It needs to be very flexible to accommodate all of us.  


    Fortunately, you'll probably only have to do a large mapping once on a particular application.  After that you'll only need a few changes here and there.

  • cunderw's avatar
    Community Hero

    The thing is there is zero way to automate this process, test complete has no way of knowing if an ID is going to be static or changing. This is like asking the tool to automate your tests. We use the ease the burden of automating tests, not do all of the work for us, which as I said isn't feasible or even possible.