Exceptions while running recordings on Application

Ask general questions here.
BHARATHMR
Posts: 19
Joined: Thu Apr 16, 2015 5:55 am

Exceptions while running recordings on Application

Post by BHARATHMR » Thu May 28, 2015 11:19 am

Anyone knows how to capture exceptions while running recordings on Application, you never know when and what time these exceptions comes.

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

Re: Exceptions while running recordings on Application

Post by odklizec » Thu May 28, 2015 12:06 pm

Hi,

Could you be more specific about your problem and what exactly you want to achieve?

What kind of exceptions? Exceptions generated by your application under test (AUT) or Ranorex exceptions? If exceptions generated by AUT, are there any dialogs/texts generated by AUT and displaying these exceptions? If so, you could use the approach of handling unexpected dialogs, described here:
http://www.ranorex.com/support/user-gui ... html#c4678
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Exceptions while running recordings on Application

Post by krstcs » Thu May 28, 2015 3:25 pm

I would suggest that you SHOULD NOT HANDLE exceptions generated by your AUT. The test should fail at that point.

If you handle the exception (by skipping it or throwing it away, etc.) then you are intentionally disregarding bugs in your System-Under-Test (SUT). Your SUT should not be throwing exceptions, it means there is something wrong.

If there are ERROR messages that your SUT displays due to some condition then you should know what those conditions are and you should test for them. For example, if your SUT is network-based, and it pops up error messages when the network connection fails, then you should specifically test for that instance. Any other time your environment should be stable enough that these messages don't appear.
Shortcuts usually aren't...