Forum Discussion

raz789's avatar
raz789
Occasional Contributor
6 years ago

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?

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

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    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.

    • raz789's avatar
      raz789
      Occasional Contributor

      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").

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        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. 

    • raz789's avatar
      raz789
      Occasional Contributor

      Hi,

       

      This has actually been elevated to a ticket. So it'll hopefully be solved there. I'll mark tristaanogres answer correct.

       

      Thanks,

      Ryan