October 29, 2012
Running GUI Tests in Minimized Windows Remote Desktop
Suppose that you have a remote Windows machine for example a virtual Windows machine in a test automation farm. You can use Windows remote desktop client to connect to that machine and monitor test automation progress. There should be no problem if you close the remote session if you are testing a background process however if you want to interact with the GUI then the moment you close the remote session then you are not going to be able to do that any more even if you keep the client running in a minimized window. To avoid this problem and keep the remote desktop window minimized while receiving input from the remote machine follow the steps below:
Java
1 2 3 4 5 6 7 8 9 10 |
Login to the computer from which you want to connect to the remote VM Close all open remote desktop sessions Click Start Click Run Type "regedit" Press Enter Go to "HKEY_CURRENT_USER\\Software\\Microsoft\\Terminal Server Client" Create a DWORD value named "RemoteDesktop_SuppressWhenMinimized" Set value to 2 Close the Registry Editor. |
Tags:Windows
About Author
Mohammed Abualrob
Software Engineer @ Cisco
2 Comments
Good post. FYI, alternative options are to use
VNC instead of remote desktop since VNC mirrors what happens on the local desktop whether it be a real machine or a VM. So a disconnect on VNC does not affect the local desktop session, since it just stops active mirroring of desktop to a remote endpoint. That’s the approach I take.
Remote desktop as the console/admin session, so on disconnect the desktop session is still open, though it may be locked screen at the local desktop, which can affect GUI automation that requires desktop unlocked. So in that case, I also fall back to VNC method.
Your solution is good but it requires keeping the remote desktop open (though minimized). With VNC, you can just connect to checkin on status and disconnect, and not waste bandwidth or taskbar/doc tray screen real estate, which is crucial if you have many remote desktops open.
I agree with you but I personally had hard time with VNC client as it keeps disconnecting.