Page 1 of 1

Exceptions while running recordings on Application

Posted: Thu May 28, 2015 11:19 am
by BHARATHMR
Anyone knows how to capture exceptions while running recordings on Application, you never know when and what time these exceptions comes.

Re: Exceptions while running recordings on Application

Posted: Thu May 28, 2015 12:06 pm
by odklizec
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

Re: Exceptions while running recordings on Application

Posted: Thu May 28, 2015 3:25 pm
by krstcs
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.