Test failed in unattended mode

Bug reports.
andreas.tastler
Posts: 36
Joined: Mon Sep 20, 2010 10:59 am

Test failed in unattended mode

Post by andreas.tastler » Wed Sep 07, 2011 1:19 pm

Hi all

We recently updated to Ranorex 3.1. Now we have some test failures while executing UITests.
We have a build server running CruiseControl.NET which builds nightly our application (WPF) and runs UITests. Now, we have always two failed testcases, but only if the UITests are running unattended. If I connectiong with VNC and watching the execution, everything is working fine.
I don't have any idea where to start analyzing this problem.
The testcase is failing at the validation of the Enabled-Attribute of a combobox. In the same recording, the attribute will be validated twice. First time works where the Enabled=true. Second time fails when Enabled=false, but the tool still believe it is true. The screenshot taken by ranorex shows the combobox disabled.

Do you have an idea?
Thank you.
Andreas

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test failed in unattended mode

Post by Support Team » Wed Sep 07, 2011 2:23 pm

Hi,

Which Ranorex version do you have used before you have updated?
Can you reproduce this problem, i mean does it always appear or only in some cases some times?
Are there any other circumstances leading to this problem?
Are there also other problems if you run the test in unattended mode?
Are you sure that the desktop is not locked and screensaver is not running during the execution of the test cases?

Please give us more detailed information about your test environment (OS x86/x64, .NET version, ...).
Can you also send us a Ranorex Snapshot file of the specific combobox?

Regards,
Markus
Ranorex Support Team

andreas.tastler
Posts: 36
Joined: Mon Sep 20, 2010 10:59 am

Re: Test failed in unattended mode

Post by andreas.tastler » Wed Sep 07, 2011 3:56 pm

Hi,

Before update I used Ranorex 3.0.5
The testcase always fails in unattanded mode and always success when I connect via VNC.
VNC does not lock the console on close. No screensaver is running.
I have another testcase which fails, but this seems to be a problem with image compression.
Testenvironment: Windows 7 x64, .NET 4.0.30319.237
I have attachaed the snapshot of the combobox in disabled state at the point where the ranorex validation fails.
Because the first time, the validation is correct, I will try to copy the repository element and do the validation with the copied element. Could it be a cache or timing issue?

Thank you.
Andreas
You do not have the required permissions to view the files attached to this post.

andreas.tastler
Posts: 36
Joined: Mon Sep 20, 2010 10:59 am

Re: Test failed in unattended mode

Post by andreas.tastler » Thu Sep 08, 2011 7:51 am

Hi,

My test with the copy of the repository element failed too. No cache problem.
I also tried a wait time before the validation: failed. No timing problem.

Thank you.
Andreas

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test failed in unattended mode

Post by Support Team » Thu Sep 08, 2011 10:40 am

Hi,

Thanks for the snapshot!
As we have seen from your Snapshot file your application is built with the .Net 4.0 Framework for
a 32 bit architecture. So can you check if your Ranorex Test Scripts are also built with the same settings?
Therefore take a look at the following link, in special at the sections #4 and #6.
http://www.ranorex.com/support/user-gui ... oting.html
VNC does not lock the console on close. No screensaver is running.
I meant before you have connected via VNC to your server, or if you do not connect to your server?

Regards,
Markus
Ranorex Support Team

andreas.tastler
Posts: 36
Joined: Mon Sep 20, 2010 10:59 am

Re: Test failed in unattended mode

Post by andreas.tastler » Thu Sep 08, 2011 2:38 pm

Hi,

I checked the general-troubleshooting.html, both sections #4 and #6. The .config file is there and the Testapplication will be built explicit x86.
Today I could reproduce the problem one time even I watched the execution of the testcase connected by VNC, but only one time. So I believe it could be a timing issue.
Now I have implemented a workaround: between the validations I close and reopen the window which contains the combobox and everything is working fine. It looks like the first validation "saves" the value and does not evaluate it again!?

Andreas

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test failed in unattended mode

Post by Support Team » Thu Sep 08, 2011 4:19 pm

Hi,
It looks like the first validation "saves" the value and does not evaluate it again!?
This shouldn't be the case, we normally always fetch a new item if Ranorex performs a validation.
Can you try to reproduce this issue with the Ranorex Spy?
Therefore you have to spy the element when the property is true and then after it changed to false.
If you get the wrong values (two times true) then this is a UIAutomation problem and it seems that UIAutomation "forgets" to update the value of the property.

Regards,
Markus
Ranorex Support Team

andreas.tastler
Posts: 36
Joined: Mon Sep 20, 2010 10:59 am

Re: Test failed in unattended mode

Post by andreas.tastler » Fri Sep 09, 2011 7:30 am

Hi,

As this issue only happens in unattended mode, I unfortunately can't reproduce this behaviour and watching the values with Ranorex Spy. But if Ranorex always fetch a new item, then it must be a UIAutomation problem. The snapshot taken by Ranorex shows clearly that the combobox is disabled (grayed), but the value is still true.
OK, the workaround does the job, currently all UITests are green... :wink:


Thank you.
Andreas