TestComplete Tip: Running Tests in Minimized Remote Desktop Windows
Develop | Posted October 10, 2010

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:

  1. Close Remote Desktop sessions opened on your computer.

  2. Click Start and select Run. In the Run dialog box, type regedit and press Enter. The Registry Editor starts.

  3. 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)

  4. 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.


By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox