Page 1 of 1

Reading unexpected error

Posted: Thu Jun 25, 2015 9:38 am
by subodh4u7
Hello expertise,

I have one situation here.
I want to capture all the unexpected/expected/silent error while running my test suite along with the screenshot.
There are some exception which occurs while running the application but it disappears without any action.
My question is how we can read/store these errors.
We might have to read the event log or any other effective method corresponding to the error occurred but how do we know which time which error had occurred.

Can anyone please help.

Re: Reading unexpected error

Posted: Fri Jun 26, 2015 8:25 am
by Support Team
Hello subodh4u7,

I would suggest using a PopupWatcher in order to deal with unexpected errors:

Please have a look at the following code example:
http://www.ranorex.com/support/user-gui ... html#c4678

Hope this helps.

Regards,
Robert

Re: Reading unexpected error

Posted: Fri Jun 26, 2015 9:08 am
by subodh4u7
Thanks Robert.
However, What if we do not know which dialog will appear during the execution of test. If we know about the particular dialog which might appear then I can add to repository and can use popup watcher to proceed with.

The real problem is where we do not when and what popup or error would appear. I want to catch these as well.

Regards
Subodh

Re: Reading unexpected error

Posted: Fri Jun 26, 2015 10:04 am
by CookieMonster
Hi Subodh,

For me your SUT sounds like miracle software, with randomized errors behavior. If the software is in good mood, then you will not have any unexpected error, and when its in bad mood then you will have unexpected errors.

But what I don't understand why you want to capture unexpected failures or errors of your application. Form my point of view, if you have an unexpected error, then the test suite or test case automation should fail, and when it fails a screenshot will be done automatically.
May be it makes sense to change your workflow (test steps) or your test design, that an unexpected error is an expected error, or speak to your development to make SUT test automation ready.
For e.g. they should implement a place holder for the error and then you can validate always this place holder, with the Ranorex Validation Action or a customized validation action.

And I also have to be honest, a popup watcher doesn't really solve the problem. Because if a Popup appears unexpected, then something has changed and has to be investigated, and maybe it's a bug or something which newly implemented from the development and has to implemented also into your test automation. But this is a matter of opinion, and can be discussed 8).

Regards
Dan