Forum Discussion

sumith_kmenon's avatar
sumith_kmenon
Occasional Contributor
12 years ago

Shared Name Mapping

Hi ,



Can we use the Name Mapping of one project to Other Project (Like Shared Repository concept in QTP)





Regards

SUMITH MENON

6 Replies

  • You need to merge them. (If you want to use elements from both)



    http://support.smartbear.com/viewarticle/55712/



    Personally, I find the Name Map management in TestComplete inferior to the Object Repository management in QTP. But just about everything else about TestComplete is better. So I've learned to live with it ...



    Ability to use multiple map files and switch between them on the fly within your code (as you can do with repository files in QTP) would be awesome ...
  • karkadil's avatar
    karkadil
    Valued Contributor
    Right-click on the Other project name, select menu item Add - Existing Item and chose the NameMapping file from another project
  • sumith_kmenon's avatar
    sumith_kmenon
    Occasional Contributor
    Hi ,

    Thanks for your reply.



    I tried to save the Name mapping but error shows "Could not add a child element from c:\..........."



    I have two projects in my project suit named AdminLogin and TestProject1. I tried to map the the 'Name Mapping' of project 'AdminLogin' to 'TestProject1'.



    Please find the attachment.



    Is it possible to rename the Name Mapping
  • karkadil's avatar
    karkadil
    Valued Contributor
    There can be only 1 NameMapping element in the project. So you need to remove existing one to add another from different project.
  • karkadil's avatar
    karkadil
    Valued Contributor
    Colin, have you tried using NameMapping Configurations? It might help avoiding switching between map files.
  • That only allows you to change the property values used to identify the items stored in the map, it doesn't allow different objects.



    I tend to just use one big name map file and split the applications/sites using Aliases.



    It's not ideal (or as good as OR's in QTP) but I'm getting used to it now and it does the job. I guess it helps that most of the stuff I've been working on since I started using TC is very dynamic so not a massive amount of name mapping required. Most things I need to identify by sifting through the DOM during the run.



    When it gets too big though, I suspect I'll end up setting up a second project/suite.