Forum Discussion

anitha123's avatar
anitha123
Contributor
13 years ago

unhandled situations and errors

Hi All,



Please let me know how to handle unexpected situation and errors encountered in Application while automating using Testcomplete tool.



Thanks ans regards,

Anitha

7 Replies

  • Hi,



    In application, there is one instance when the application throws an unknown error and the application closes. Please let me know how this error can be handled while doing automation.
  • Anonymous's avatar
    Anonymous

    Hi Anitha,



    Event handlers may suit your needs. Please see the 'Handling Events',  'OnLogErrorEvent' and  'OnUnexpectedWindowEvent' articles for more information.



    You can use the following approaches:



    1. Using the project settings of the Playback group and the OnUnexpectedWindow event handler, you can handle unexpected windows that may appear during the execution of your tests in the needed way. For more information, see the 'Handling Unexpected Windows' article.



    2. As for handling exceptions in scripts, you can use the statements provided by the scripting languages to accomplish the task. Please refer to the 'Handling Exceptions in Scripts' article for details.



    I hope this helps.
  • Hi Tanya,



    Hi ,


    We use test complete for beta testing  and Release Testing of our application. We expect the application to crash in beta testing from
    where the developer will solve the issue. While the application crashes, the window
    crashes message pop-ups, and the Test complete waits for the human effort to
    close the crashed window. In other word, if we are away from the testing PC, we
    are not aware that the Testing is halted due to the crash.



    Is there is any option to handle / Stop the Testing while
    there is an application crash. 



    The Even Handler is working fine when an un-expected window pops-up / Time-out happens inside the application. But when whole application (the application we are testing) itself crashes, the Test Complete is hanged until the we manually close the crashed application. Once we close the crashed application the Test Complete continue



    Is there is any way to handle it



    Regards,



    Rajesh Thomas

  • Anonymous's avatar
    Anonymous

    Hi Rajesh,



    As far as I can see, Mike is already working with you in that forum thread. I suggest that you continue working with him.



    In the future, please do not create duplicate threads as they complicate message processing on our forum. 
  • Hi Tanya,



    I was not intended to create multiple thread, As i didn't get any response from this thread, i though i should create a new one for my question. Once i got the reply from this thread, i mentioned the link of the thread i have created so that we can avoid duplication.



    - Rajesh