Forum Discussion
: Do you know when it gets a crash? like memory limit, session time, etc.
: Usualy it crashes somewhere around 1 hour after starting the test , there is no particular step though.
I think memory must be one of the reason also.
Hi,
With the crashed tested application, TestComplete should trigger log error because of inaccessibility of some UI control that test code will try to interact with right after the moment of crash.
So, you can create a handler for the OnLogError event and check there whether or not the application crashed and proceed appropriately. The exact check will depend on how application crashes. If its process has gone, then the check may be a simple verification for Sys.WaitProcess('<your tested application>', 500).Exists. If some crash dump window is displayed on crash, you may need to check for this window. And so on.
Note, that if you decide to restart your application from within the OnLogError event handler, than you must set a flag that you already is within the handler and exit from the handler if an error occurs while restarting the application. Otherwise you may appear within endless recurrent loop that will exaust system resources.
The bad news is that TestComplete does not provide any built-in means to restart the failed test item. Thus you must implement your own logic and execute it on start of every test item to determine if the current test item can be executed or not.