Reading unexpected error

Ask general questions here.
User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Reading unexpected error

Post by subodh4u7 » Thu Jun 25, 2015 9:38 am

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.
Regards,
Subodh

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Reading unexpected error

Post by Support Team » Fri Jun 26, 2015 8:25 am

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
.
Image

User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Re: Reading unexpected error

Post by subodh4u7 » Fri Jun 26, 2015 9:08 am

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
Regards,
Subodh

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: Reading unexpected error

Post by CookieMonster » Fri Jun 26, 2015 10:04 am

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