Ask a Question

NameMapping - Adding recorded names to my manually mapped objects

SOLVED
JPD
Occasional Contributor

NameMapping - Adding recorded names to my manually mapped objects

Hello, 

 

I am testing a large Desktop Application and wish to utilise other members of the team at least in the NameMapping process. 

 

I have already started to Map names manually, selecting properties to map and giving them suitable names, but in order to speed things up I was hoping to use the recorded name mapping to at least manually map a lot of the objects which I would then edit to use more suitable properties and names. 

 

However, everytime I attempt to map some new names with a recorded test rather than recognising I have already mapped some of the existing objects, or even the tested application, and then not adding any items until it finds an unmapped object it is just creating a whole new object tree under the existing one. 

E.G, 
Manual Maps App > Shell > Grid > Pnl > btn 

If I was to naviagate to the same place in a recorded tests I would see:

App > Shell > Grid > Pnl > New Btn 

Under the existing tree. 

Instead of: 
Manual Maps App > Shell > Grid > Pnl > Btn - New Btn 

Is this an issue with my configuration or is what I am hoping for not a feature currently? 

8 REPLIES 8
tristaanogre
Esteemed Contributor

If you've already mapped something in a project, when you record, it should use the existing mapping if, during the recording process, it finds the same object.

 

What your results tell me is that, when you're recording, it's not always finding the same object meaning something you're using in your properties is dynamic enough that, each time you run your application, the value changes.

 

If you could post screenshots of your namemapping with images of the properties for the objects you're having trouble with, that would be helpful.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
JPD
Occasional Contributor

Hello, 

 

Thanks for a quick response. 

 

I think I am generic enough to not be falling foul of any dynamic property changes whilst being specific enough to ensure the correct objects are being found. 

 

The app is being located with conditional - Name/FullName/ProcessName - where they can vary based on the environment we are testing on. E.G, name = Process("AppReleaseCandidate") or name = Process("AppTest")

 

From then on it is mostly ClrFullClassName or ClrClassName, or if I can be sure that the Name is static enough then using that as well. 

 

All the existing items have been added manually to NameMapping from the object tree view. 

 

Recording new tests will add a duplicate NameMap for everything, from the App -> Shell > LayoutRoot > Presenter. Each of which do not change dynamically. 

I have attached the current map down to The Main Content Control item.  

JPD
Occasional Contributor

And in addition here is an example of a 2nd tree being added by the automapping features 

cunderw
Community Hero

What are the identification properties for App and AppTest?


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
JPD
Occasional Contributor

The one I manually mapped 'App' used a conditional mapping on: 

Name - Process("AppTest") or Process("AppReleaseCandidate")

and 

 

FullName - Sys.Process("AppTest") or Sys.Process("AppReleaseCandidate")

 

and 

 

ProcessName - AppTest or AppReleaseCandidate


Allowing for us to test both environments. 

 

The auto map will usually just map on 

Name - Process("AppTest") 

 

as this is the environment we were mapping on. 

 

I have tried changing the mapping properties of App to match the ones that get consistently auto-mapped alone but to no avail. 

cunderw
Community Hero

Can you post full screenshots of all of that?


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
JPD
Occasional Contributor

Hi CunderW, 

I have attached a screen of the mapping properties. 

The ones I described above added by me and the ones added automatically when mapped. 

 

Unfortunately TestComplete continues to just duplicate all of the objects rather than add any recorded additions to the exsiting mapping. 

 

The ability to farm out the process of recording objects on mass and then editing the properties would potentially be a huge timesave for us but considerably less so if we would have to start again. 

JPD
Occasional Contributor

I appear to have solved it. 

I remapped my App to match exactly what is mapped by the recorded scripts. Ensured that in Tools > Options I was set to update namemapping whilst recording and then recorded a new test. 

 

(Although as previously mentioned I had tried to rename the mapping properties before). 

 

I am going to accept this as the solution. 

Thank you all for trying to help me troubleshoot. 

 

Solution = Remove conditional mapping on App. Remap App properties to match exactly what the duplicate object was using when mapped during a recorded test. Ensure option to update when mapping was on. 

cancel
Showing results for 
Search instead for 
Did you mean: