Forum Discussion

clay's avatar
clay
Contributor
6 years ago

TestComplete race conditions on VM platforms?

I have been using TestComplete with great success on my desktop computer.  However, I have recently started using TestComplete on a virtual machine via remote login.  All of a sudden, there appears to be a number of race conditions on the VM that did not occur on my desktop.  This typically occurs when I am running background processes via TestedApps to monitor messaging activity behind the scenes with respect to the main application being tested.  These background processes will forward information to TestComplete for things such as performing XML checkpoiints.

 

I could introduce delays of arbitrary length within the KWT's to overcome my problems, but I would like something a little more elegant.  On the other hand, I would prefer not to delve into mutexes and semaphores in my javascript!

 

Does anybody have experience with what I am running into?  Any thoughts on the best way to handle the timing?

 

Thanks!

4 Replies

    • clay's avatar
      clay
      Contributor

      Thank you, Marsha. 

       

      I have been using the the TestComplete "wait" calls for quite some time.  However, in the situations I am talking about, I have been unable to find a suitable "wait" method call.  The background processes expose very little in the way of underlying objects/properties for these mechanisms to work.

       

      I am looking for some other (uncommon) tricks to use.  For example, in one case I have solved the problem by polling the status of a file (ie., does it exist and is it "closed") as a method of synchronization.  I do this using the aqFiles library and a while loop.  Klunky, but it works and I do not have to use an arbitrary wait period hoping that something important happens and then move on as if it did happen.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Then it would help to know what other sorts of processes you are having trouble with.  Hard to know which tricks to use when we don't know exactly what is failing for you.