Forum Discussion

dcfecker's avatar
dcfecker
Contributor
8 years ago

testexecute fails on one machine and passes on another, why?

I have a standard WPF desktop application. I've built out a nearly complete test suite in TestComplete. On the same machine as TestComplete I have a copy of TestExecute and the tests run to completion there as well. I save the entire project on git and pull it on the jenkins machine.

 

On my Jenkins machine I have the entire project right now and TestExecute running. But the first test only gets about 1/2 way through the automation script and then fails to locate a specific object and the errors out and ends the script. 

 

Why does it work on one and not the other?

  • Most probable scenario is one machine is faster / slower than the other.

     

    Your time settings OK with faster machine but slower matching it takes time to create on-screen objects so TC expires it's waiting time and fire "object can not be locate" error.

     

     Or else you may have defined machine depend parameters  (eg file path C:\temp\myfile.txt but one machine has file in C:\temp1234\myfile.txt )

     

  • Hi Team,

    I'm facing the same issue as given here. Even after having the system dependent file location right, there is no luck. It fails to locate the object even if the object is right there on the screen.

    It works absolutely fine on the machine where i developed it though, but fails to run on a different similar machine.

    Any help here please?

     

    Thank you!

      • dcfecker's avatar
        dcfecker
        Contributor

        Yes I did. And in the process learned some more about timing, and the timing of the pop-up WPF windows in our application. I discovered if I do an ever so slight delay, just a few hundred milliseconds, and then a .Refresh(), I would find the missing object and on the script went. So thanks y'all.

         

        Dave

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm guessing that NisHera's first suspicion is closer to correct, although the second has merit, too.  As a test, just to see if it helps, add a Delay of several seconds right before the failure point to give the AUT time to catch up.  If that fixes it, you may want to investigate using some WaitNNN methods or increase your auto-wait timeout settings.

  • NisHera's avatar
    NisHera
    Valued Contributor

    Most probable scenario is one machine is faster / slower than the other.

     

    Your time settings OK with faster machine but slower matching it takes time to create on-screen objects so TC expires it's waiting time and fire "object can not be locate" error.

     

     Or else you may have defined machine depend parameters  (eg file path C:\temp\myfile.txt but one machine has file in C:\temp1234\myfile.txt )