Ranorex stops working when application under test crashes

Ask general questions here.
tejas.deshpande
Posts: 32
Joined: Fri May 20, 2016 9:43 am

Ranorex stops working when application under test crashes

Post by tejas.deshpande » Wed Jul 19, 2017 6:03 am

I am working with an app that can crash at any event. When it does, Ranorex stops working and I have to close both applications, potentially losing the report of the previously executed test run.

Is there a way to close my application under test and stop Ranorex test run to indicate the crash and create a report informing the same?

Any suggestions are appreciated!

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Ranorex stops working when application under test crashes

Post by Stub » Wed Jul 19, 2017 8:27 am

I've been suffering much the same with my Windows desktop app. I get a Windows "application has stopped working" message box and Ranorex blocks until I go on to the test machine and clear it some hours later.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex stops working when application under test crashes

Post by odklizec » Wed Jul 19, 2017 9:02 am

Hi,

I'm afraid, without seeing the error and understanding the state of app after so called "crash", it's hard to suggest a reliable solution. Basically, I would consider using popup watcher (described here). This could watch the AUT state, eventually react on an error/crash message. Then if the application remains open and you need to restart it, you can use for example Process.Kill() method to kill the app and then reopen it from code. Hope this helps a bit?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration