Stop TestComplete execution if application under test crashes
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 to the next test item.
The situation is as follows:
1. the application under test is started
2. several things are done in the application
3. an error occurs suddenly and the application is completely closed without any error message or other hints and the process is terminated. I.e. it no longer exists in the Windows system.
The problem is now, that TestComplete doesn't notice any of this and the test execution simply continues.
This means that one error comes after the other.
In this case, however, the test execution should simply be stopped.
Please do not send me the link with the SmartBear Support page where the topic "Tracing Exceptions, Crashes and Freezes" is covered. This doesn't help in case of a crash! Also in case of a crash the LogOnError event is not triggered.
To add a check in several places in KeywordTests/Scripts would be a solution I would like to avoid!
Is it still technically possible to do this in TestComplete?
best regards and many thanks
Klaus
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for that detailed answer!
