Forum Discussion

TestOfficer's avatar
TestOfficer
Occasional Contributor
6 years ago
Solved

Stop TestComplete execution if application under test crashes

Hi SmartBear Community,   I think my question is very simple but not so easy to understand. If the application under test crashes, TestComplete should either stop the test completely or switch t...
  • tristaanogre's avatar
    6 years ago

    While the application crash is not detected, I'm assuming that there are other errors that occur after the crash, usually object identification errors of sorts.

     

    I would still suggest using OnLogError event handler.  What you could do is, in that event handler, add a check for if (!Sys.WaitProcess('myapp').Exists) then to detect if the process is present.  If it is not, you can call Runner.Stop() and kill the whole test run.

    An alternative: In TestComplete 14, under Tools -> Current Project Properties -> Playback there's an On object recognition error setting that you can set to Stop Project which will halt the whole run if an object recognition error occurs.