Running automation via Remote Desktop

Best practices, code snippets for common functionality, examples, and guidelines.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Running automation via Remote Desktop

Post by atom » Thu Apr 08, 2010 4:50 pm

Hiya

Is there any guidelines for executing a ranorex test on a VM, and watching it execute via remote desktop
I noticed something odd, in that Report.ScreenShot logged totally blank screenshots when the remote desktop window was minimised.

Regards

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Remote Desktop

Post by Ciege » Thu Apr 08, 2010 5:29 pm

Hmm, never seen that... I do 100% of my testing on VM machines with Ranorex and connect to them either via the VM console (if it is a VM on my desktop) or through RDP if it is a VM on a remote machine. All with no issues similar to that.
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...

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

Re: Remote Desktop

Post by Support Team » Fri Apr 09, 2010 9:15 am

Remote Desktop locks the screen when you minimize or close the RDP window, that causes screenshots to be blank/black and automation to fail. Consequently, if you use Remote Desktop, you need to have the RDP window open during automation (not minimized).

Ciege posted a workaround where you have a VM that keeps all the Remote Desktop windows open (and doesn't do automation) and you only connect to that VM from your PC:
http://www.ranorex.com/forum/feature-re ... html#p4593

An alternative to RDP is using VNC or the VMWare Remote Console:
http://www.ranorex.com/forum/is-it-nece ... t1128.html

Regards,
Alex
Ranorex Support Team
.
Image

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Remote Desktop

Post by atom » Fri Apr 09, 2010 9:52 am

ok thanks for update i'll change to VNC

User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Re: Remote Desktop

Post by Gunner1980 » Thu Apr 22, 2010 11:11 pm

Just as an FYI, if your using Real VNC you will most likely notice it is much slower than remote desktop.

I just tried this out and the difference was night and day. I can now run scripts while my VNC connection is totally minimized and it is fast!

smalldoorman
Posts: 14
Joined: Thu Aug 12, 2010 10:37 pm

Re: Running automation via Remote Desktop

Post by smalldoorman » Tue Oct 12, 2010 7:54 pm

I remote desktop to a machine in our Lab and run/record tests from my desk.

While running tests I have minimized the window and done my other work while the AT was going, though this is on a Win7 to a Win7 machine. I could mouse over my start bar and see at a glance how my test was doing and since I'm always testing GUI's, the mouse is always moving and my screen saver never kicks in during the AT.

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Running automation via Remote Desktop

Post by atom » Tue Oct 12, 2010 8:01 pm

Hmm... maybe win7 remote desktop is nicer!

mrusso
Posts: 16
Joined: Thu Feb 03, 2011 12:54 am

Re: Running automation via Remote Desktop

Post by mrusso » Mon Mar 21, 2011 10:28 pm

I remembered that I read about a possible solution to this issue here:

http://blog.smartbear.com/post/10-10-11 ... p-windows/

The general steps are to modify the registry by doing the following:

locate the key:
HKLM\Software\Microsoft\Terminal Server Client\

add a DWORD value in this key, naming it "RemoteDesktop_SuppressWhenMinimized", and give it the value 2.

If you're a 64-bit client, add that value to this key:
HKLM\Software\Wow6432Node\Microsoft\Terminal Server Client\

I haven't had a chance to try it out personally, though.

assuming it works, here's some code you could throw in a .reg file that automatically adds those keys to your registry.

32-bit:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:2
64-bit:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:2

natasha
Posts: 5
Joined: Mon Oct 17, 2011 7:18 pm

Re: Running automation via Remote Desktop

Post by natasha » Mon Oct 17, 2011 7:22 pm

Hi - I had a chance to try out mrusso's fix, and it did the trick. Now, minimizing the remote desktop window no longer disables the screen. Thanks!