The Microsoft Windows operating system includes the Remote Desktop component that allows you to connect to a remote computer and work with it as with your local computer. This is a common way to run and monitor automated tests on remote computers: you connect to the test computer using a Remote Desktop Connection (RDC) and use the Remote Desktop window to work with the remote computer on your PC.
There is a pitfall using this scenario: you may not minimize the Remote Desktop window (that is, the window which displays the remote computer’s desktop), or your GUI tests will fail. If you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, TestComplete (or TestExecute) are unable to interact with the tested application’s GUI as the GUI doesn’t actually exist in this case.
Keeping the Remote Desktop window visible may be inconvenient, as it will occupy some part of or even your entire screen, and you will have less space for running your local applications.
We have found a way to bypass this limitation. The workaround is simple: you need to change Registry keys on your computer (that is, the computer from which you connect to a remote TestComplete or TestExecute workstation). Here is a step-by-step description:
Close Remote Desktop sessions opened on your computer.
Click Start and select Run. In the Run dialog box, type regedit and press Enter. The Registry Editor starts.
Locate any of the following Registry keys:
- HKEY_CURRENT_USERSoftwareMicrosoftTerminal Server Client
(if you want to change the RDC settings for your user account)
-- or --
- HKEY_LOCAL_MACHINESoftwareMicrosoftTerminal Server Client
(if you want to change the RDC settings for all accounts)
Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.
That’s all. Now minimizing the RDC window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tests.