Forum Discussion

Blur's avatar
Blur
Contributor
10 years ago

Test cases failing on different machines

Hello,

 

I am having an issue where I can run test cases perfectly fine on my machine but the same test cases fail on a different machine.  The error I am getting is "The object does not exist" .

  • We found that the timing is a problem for us between different machines.  It happens between laptop, vm, wherever we run it.  If the application was running slower on a particular machine, then the objects weren't there by the time the test was ready for them.

     

    There are a couple of different things we try when this happens.  If it's on just a few objects, then you can put a delay in right before the actions that are failing.  If it happens in too many places for that to be feasible, then you can go to Tools -> Current Project Properties -> Playback and make Delay between events a little longer.  This slows the whole test down a little but it can make things run more smoothly.

5 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    Check the object in your namemapping. Most like what happened is that the second machine is causing one of the objects identification properties to change. You can wild card the property, or not use it at all. 

  • We found that the timing is a problem for us between different machines.  It happens between laptop, vm, wherever we run it.  If the application was running slower on a particular machine, then the objects weren't there by the time the test was ready for them.

     

    There are a couple of different things we try when this happens.  If it's on just a few objects, then you can put a delay in right before the actions that are failing.  If it happens in too many places for that to be feasible, then you can go to Tools -> Current Project Properties -> Playback and make Delay between events a little longer.  This slows the whole test down a little but it can make things run more smoothly.

    • Blur's avatar
      Blur
      Contributor

      I've been putting dozens of delays per test case.  Will give slowing down the project as a whole a try.  Seems like a better idea.

      • ztestman's avatar
        ztestman
        New Contributor

        My department is having the same issue. We ran a script that we used and that passed with TestComplete 10 and TestExecute 10, with TC 11 and TE 11. The only time it passes now is on the host machine. The very first step it fails and says that object cannot be found. When we use the Object Spy the name mapping is the exact same still. We have been trying to figure out why the scripts that had no issue before are now having issues running on all machines but the host machine where the script orignated from.