Forum Discussion

egiacomi's avatar
egiacomi
Contributor
6 years ago

Desktop application testing on virtual machine

Hi,

I have a project on TestComplete that tests a Desktop Application . 

If I run the project on virtual machine i have some problem about object recognition instead if i run the project on a physical pc I haven't any problem .

The virtual machine has the same resolution of th physical pc .

which could be the causes?

 

Emanuele

  • You can bump that timeout as high as you need to.  It's a timeout so if the object returns before the time is up, it will stop waiting.  

    Thanks for the response.  Please mark a reply on this thread as a solution if we were able to help you.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Different operating system?  Different DPI setting? Any number ofthings could change that.

    • egiacomi's avatar
      egiacomi
      Contributor

      I have the same operating system (win10) and the same resolution(fullHD).

      Can videoboard settings complicate the object recognition ? like antialias,overposition ..

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi egiacomi,

    What exact object recognition issues did you face? I will appreciate if you post here the screenshots illustrating the issue.

    • egiacomi's avatar
      egiacomi
      Contributor

      Hi TanyaYatskovska ,

      I solve partially  the issue, the vm has an hardware less powerful in front a physical pc, after some tests i try to increment the delay between events to 3000 ms and this change solves more or less 80% of errors .

      For the other errors at the moment I haven't a solution , an example is this :

       

      P.S.

      the VM has 4 CPU and 8 GB of ram . 

      Thanks for the support

      Emanuele

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        That would do it.  So, the object recognition errors are due to timing, where the application isn't displaying the forms as rapidly as you expect it to.  

        Couple of things you can do to correct... you found one.  The Auto-Wait timeout in Tools | Options will help with that. 

        You can also write into your code judicious places where you use a WaitChild or WaitAliasChild call to wait for an object to show before proceeding. 

         

        But I think, generally, you're on the right track here.