Forum Discussion

william_diaz's avatar
william_diaz
Occasional Contributor
12 years ago

TestComplete 9.2 locks-up during tested application error. (Does Javascript support threads?)

Hello,



We had to revive an old project that was build for windows XP and .NET2.0



We are trying to run our current scripts (Windows 7) and we are encountering random crashes on the tested application. They go deep into the .NET framework. the UI of the application might display a dialog or we might get a Windows OS dialog. either way the application its hosed.



I noticed that when the application crashes Test Execute 9.2 freezes as well. waiting for the application. There is no error on the log. If we however Kill the application process TE wakes up and displays the error about not finding the window in x seconds and moves to the next test.



We would like to monitor our log file for activity and if the application becomes unresponsive we would like to kill it and let Test Execute move to the next test.



This could be done on a separate thread but I'm not sure if JS supports this. I noticed an option in the project properties "Freeze Diagnostics" that seems like it might work but I wanted to get your opinion first. Thanks

 

5 Replies

  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Hi Will,



    Have you tried configuring the Project's Freeze Diagnostics property ? See documentation here.



    Sincerely
  • william_diaz's avatar
    william_diaz
    Occasional Contributor
    I'm trying it now, Will let you know if it works. I just want to hear about any possible option. Thanks.
  • william_diaz's avatar
    william_diaz
    Occasional Contributor
    The Freeze diagnostics does not seem to be working in one case where the exception is caught by the application being tested. The application displays a dialog box with an OK button, TC just waits. After we dismiss the dialog the tested application restarts, TC only then wakes up.



    Again, does anyone know if its possible to spawn a separate thread within testcomplete to monitor our log file. If we notice that the log has not been updated within 10 mins or so, we can restart the application ourselves.



    I have not been able to find information on spawning threads in TC with Javascript. I have not tried the Timers because I assume that if the main thread its blocked by the crash then a timer will never be called. I could be wrong, any information would be great,



    Thanks

  • william_diaz's avatar
    william_diaz
    Occasional Contributor
    The Freeze diagnostics does not seem to be working in one case where the exception is caught by the application being tested. The application displays a dialog box with an OK button, TC just waits. After we dismiss the dialog the tested application restarts, TC only then wakes up.



    Again, does anyone know if its possible to spawn a separate thread within testcomplete to monitor our log file. If we notice that the log has not been updated within 10 mins or so, we can restart the application ourselves.



    I have not been able to find information on spawning threads in TC with Javascript. I have not tried the Timers because I assume that if the main thread its blocked by the crash then a timer will never be called. I could be wrong, any information would be great,



    Thanks

  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Hi Will,



    For the unexpected windows, there are configurations for that !



    Please checkout the documentation and the attached screenshot.



    Sincerely