I am using Ranorex 2.1.2 version to test Microsoft Outlook 2K3/2K7.During testing sometimes Outlook got hung or crashed.
Can anyone tell me how to identify the state of application when it is hung or crashed?
Thanks
How to identify application state if application is hung?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to identify application state if application is hung?
You might want to try the NativeWindow adapter (from your Form) which contains a property named
"AppHung"
Michael
Ranorex Team
"AppHung"
Michael
Ranorex Team
-
- Posts: 24
- Joined: Tue Apr 14, 2009 12:29 pm
Re: How to identify application state if application is hung?
When hang is observed, we will be not able to run our application (which is using Ranorex). Unless we get the form, we cannot query for property "AppHung". Then it becomes chicken and egg problem.
Moreover, if I have more than 1 application launched from my application, how to identify which application has hung.
Should I use background process to identify the hang? Any clue on this?
Moreover, if I have more than 1 application launched from my application, how to identify which application has hung.
Should I use background process to identify the hang? Any clue on this?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to identify application state if application is hung?
Could you please describe in more detail what you are trying to accomplish and what is running where (including Ranorex).
Regards,
Michael
Ranorex Team
Regards,
Michael
Ranorex Team
-
- Posts: 24
- Joined: Tue Apr 14, 2009 12:29 pm
Re: How to identify application state if application is hung?
We are developing Ranorex Automation Suite with Ranorex 2.1.3. Our application is integrated with Outlook. We automate scenarios using Outlook controls and windows. We have crash handling framework integrated with our Ranorex Automation Suite. The objective of this is to identify if any crashes are found, handle them and continue with next case.
We use Windows Debugging Tools to handle crashes. As part of this, we will get 'cdb.exe' console window application with cdb.exe as part of window text. We use the same text to identify this console window and close it and then continue with next test case.
Whenever we observe this cdb.exe during our Automation Suite run my Outlook and other applications become hung. I could see it from my Task Manager->Applications tab with status as 'not responding'. I want to know how to identify my Outlook application is hung. But I could see cdb.exe window is active and I could spy it with RanorexSpy. I could see 'AppHung' property of cdb.exe in RanorexSpy as 'False'. To verify 'AppHung' property, first I should be able to query Outlook form. Then only i can use 'AppHung' property to know if it is hung.
Moreover Ranorex is not able identify cdb.exe console window. We tried following ways to identify the same window:
Using Object repository
using RxPath
Enumerating all forms using Host.Local.FindChildren()
But none of them is able to identify this window.
I hope I have answered your question.
We use Windows Debugging Tools to handle crashes. As part of this, we will get 'cdb.exe' console window application with cdb.exe as part of window text. We use the same text to identify this console window and close it and then continue with next test case.
Whenever we observe this cdb.exe during our Automation Suite run my Outlook and other applications become hung. I could see it from my Task Manager->Applications tab with status as 'not responding'. I want to know how to identify my Outlook application is hung. But I could see cdb.exe window is active and I could spy it with RanorexSpy. I could see 'AppHung' property of cdb.exe in RanorexSpy as 'False'. To verify 'AppHung' property, first I should be able to query Outlook form. Then only i can use 'AppHung' property to know if it is hung.
Moreover Ranorex is not able identify cdb.exe console window. We tried following ways to identify the same window:
Using Object repository
using RxPath
Enumerating all forms using Host.Local.FindChildren()
But none of them is able to identify this window.
I hope I have answered your question.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to identify application state if application is hung?
It might work if you collect all Outlook forms *before* starting your test cases :
You might also want to try version 2.1.4 which fixes a apphung-related problem.
Michael
Ranorex Team
myAutForms = Host.Local.Find("/form[@processname='OUTLOOK']")and then check if they are hung:
foreach(Form form in myAutForms) if (form.As<NativeWindow>().IsAppHung) {...}If you are able to identify the cdb.exe window with Spy please send us a snapshot.
You might also want to try version 2.1.4 which fixes a apphung-related problem.
Michael
Ranorex Team
Re: How to identify application state if application is hung?
I tried this which is not working.
Can you please tell me how can I get the native window for a form?
Please suggest me that if my application got hang in step 3 and it is not allowing step4 to execute then how can I check the ‘AppHung’ property for my application.
Can you please tell me how can I get the native window for a form?
Please suggest me that if my application got hang in step 3 and it is not allowing step4 to execute then how can I check the ‘AppHung’ property for my application.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to identify application state if application is hung?
You can get the native window using:
What step is step 3 in your application ?
Michael
Ranorex Team
Code: Select all
NativeWindow formWindow = form.As<NativeWindow>()
Michael
Ranorex Team