cancel
Showing results for 
Search instead for 
Did you mean: 

Name mapping does not work with TestExecute in a VM

New Contributor

Name mapping does not work with TestExecute in a VM

Hi guys,

 

Currently trying to get TestExecute to run our project on a VM.

I'm running into an issue where none of the name mapping Aliases work. The objects can't be found during the test if aliases are used.

 

What does work is using the Mapped Object name.

 

What works (the object spy for the VM reports the same mapping as the PC where the test was recorded):

#VM object spy WIN10
Sys.Process("AppTEST").VBObject("frmMainNew").Window("MDIClient", "", 1).VBObject("frmBackGround").VBObject("Picture1").VBObject("frameButtonsMain").VBObject("cmdMaintenance").Click(330, 65)


#Test Recording PC object spy
Sys.Process("AppTEST").VBObject("frmMainNew").Window("MDIClient", "", 1).VBObject("frmBackGround").VBObject("Picture1").VBObject("frameButtonsMain").VBObject("cmdMaintenance").Click(330, 65)

What doesn't work:

Aliases.AppTEST.frmMainNew.MDIClient.frmBackGround.Picture1.frameButtonsMain.cmdMaintenance.Click(330, 65)

The VM is running 14.0.308.11

The Host PC is running 14.0.308.7

 

Am I missing something in the settings? Do I need to run TestComplete on the VMs first before TestExecute will work properly?

5 REPLIES 5
Highlighted
Community Hero

Re: Name mapping does not work with TestExecute in a VM

It would be good to know the specific error messages you're getting when you run using Aliases.  That will indicate what the actual problem is.  There's an additional info tab which goes into more detail.

 

Basically, what it sounds like is that you've mapped your objects using environment specific properties. For example, if the screen resolution is different and you're using things like Top, Left, Height, Width to map.  It could be a change in operating system so there could be differences in how some of the classes are recognized. So, when you change the environment, the objects are no longer mapped properly. 

 

There are no special settings, no need to run anything in particular, just need to make sure that your mapping is sufficently environment agnostic.


Robert Martin
[Community Expert Group]
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
Extensions available
New Contributor

Re: Name mapping does not work with TestExecute in a VM

It's definitely not how the objects themselves are mapped. Using the literal mapped object path works. Aliases do not. The object spy returns the same mapped object path in the recording environment and the VM.

 

The error is simply it can't find the object in the application based on the Alias. The test will just sit and wait for the object.

 

There would be too much code to go through at this point to change it from aliases to the literal path (the one using "Sys.XX").

Community Hero

Re: Name mapping does not work with TestExecute in a VM

No, it's how the objects are mapped.  The Sys pathing is using a different means of identifying the object than the Mapping.  Something in the mapping is machine specific.  So, show us how it is mapped.  If it can't identify using the mapping, then there is something different on the one machine that is causing the mapping to fail. 


Robert Martin
[Community Expert Group]
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
Extensions available
New Contributor

Re: Name mapping does not work with TestExecute in a VM

Ah sorry,

 

I'm still new to this, but I believe you're correct. Looks like one of the mapping properties for the button doesn't exist in the VMs. Not entirely sure why.

Community Hero

Re: Name mapping does not work with TestExecute in a VM

Depending upon the component, the operating system, etc., there are frequently different properties.  Some technologies utilize the operating system differently depending upon the OS. 


Robert Martin
[Community Expert Group]
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
Extensions available
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2