How do you guys determine when the AUT is doing heavy processing/busy/blocked?
I'm dealing with an app that spends a lot of time waiting for the DB to respond. When the app is waiting for the DB results, the app itself is idle (doesn't register any CPU usage), but it's blocked (you can't click or interact with it).
-So far, I've tried looking at the mouse pointer (hourglass) as an indicator, but sometimes the app is blocked but cursor is normal.
-I've tried looking at the parent process of the AUT for TotalProcessorTime (this measures if the app is IDLE or BUSY), but like I said, sometimes the app is IDLE, and still blocked.
So i'd like to tape into the Ranorex crowd's experience to see how you guys handle that?
Thanks
Determine if AUT is busy/blocked?
Re: Determine if AUT is busy/blocked?
Does your AUT present any sort of indication to the end user that it is busy? IF not, I would consider that a design flaw, but thats OT.
A please wait text, or grayed out buttons, etc...
You should have Rranorex watch for something that only appears during the busy period or watch something (like a button or text box) to become enabled again. You can do this using a simple while loop. I.e. while thisbutton is not enabled, sleep for 1 second.
A please wait text, or grayed out buttons, etc...
You should have Rranorex watch for something that only appears during the busy period or watch something (like a button or text box) to become enabled again. You can do this using a simple while loop. I.e. while thisbutton is not enabled, sleep for 1 second.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Determine if AUT is busy/blocked?
@Ciege: No visible indication whatsoever. It is a design flaw, but I don't have access to the code for fixing, so I'm looking for ways around that. It'll most likely have to be a Win32API call...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Determine if AUT is busy/blocked?
The way Ciege proposed is the recommended one by Ranorex. As he said, just search for something that becomes enabled (e.g. using the "enabled" attribute in your RanoreXPath) or appears when the AUT is ready again. You don't even need a loop, you can just use a repository item with a higher timeout.Ciege wrote:You should have Ranorex watch for something that only appears during the busy period or watch something (like a button or text box) to become enabled again.
Alternatively, if your application does not provide a visual effect when it is unresponsive, you can try to use the NativeWindow.AppHung property that is "true" when the form is not responsive to window messages. You can again wait for the "AppHung" property to become "false" in a loop or you add that condition (@apphung='false') to your RanoreXPath:
Ranorex.Form form = Host.Local.FindSingle( "/form[@title='Your App Title' and @apphung='false']", 60000);Regards,
Alex
Ranorex Team