Forum Discussion

dale_alano's avatar
dale_alano
New Contributor
11 years ago

Changing Mapped Object's Hierarchy

Good Day,

 

I have a question regarding changing a mapped object hierarchy and how it affects existing keyword tests that has reference to aliases of said object. Our team is currently in the design process of developing the framework for a new application that we would like to do automation against and I do have a bit of a concern in regards to using name mapping. As I've read from SmartBear support site, when you update the object hierarchy in name mapping, this also requires to update test cases to use the new syntax of mapped names and aliases. 

 

What if there is a huge list of keyword tests that uses the old syntax, does that mean I will have to go through each keyword test and update it to use the new syntax? Is there a better/faster way to update the keyword tests?

 

I'm quite new to the community but I would highly appreciate any response regarding this matter. 

 

 

Thanks,

 

3 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    I’m not using key-word tests. But it seems to be u may hv big mess up to  clear.

    In my case I have separate scrips solely to interact with application and others to drive actual functional/tests. So name mapping would affect only for first kind of scripts.  

     

    One advice I can give is keep step by step back-up of namemapping.tcMN file. You can not redo changes. Also there are lot of posts in the forum about name mapping and test frame-work designing  

    • NisHera's avatar
      NisHera
      Valued Contributor

       

      Depending on how your tests written and changes done to application you may.

      • Keep mapping name and change mapped object
      • Keep high level mapping and search child object
      • Use much conditional mapping as possible
  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    If you are editing an existing mapping in TestComplete, you'll see a warning that it's being used in a keyword test and given a choice to update it.  That has worked well for us.

     

    If it will be a whole new mapping, then yes you will have to update your tests.  In our case, we did search and replace inside TestComplete, but it was each test separately.

     

    I have seen other posts in the forum talk about updating files outside TestComplete but I am not familiar with that.  Not sure if if works with keyword tests or only with scripting.