Running Tests in Minimized Remote Desktop Windows

Applies to TestLeft 15.40, last modified on March 17, 2022

If you run a test on a remote computer to which you have connected via Remote Desktop and you minimize the Remote Desktop window, the operating system switches the remote session to the GUI-less mode. As a result, the test engine will not be able to interact with the tested application GUI and your test will fail.

To work around this issue, on your local computer (the one from which your launch Remote Desktop), change the registry settings that affect the way Remote Desktop treats the GUI of the remote session when being minimized.

Change your local computer registry settings

  1. On your local computer, close all open Remote Desktop sessions.

  2. Launch the Registry editor (regedit.exe).

  3. Navigate to one of the following Registry keys, depending on whether you wish to modify the Remote Desktop settings only for the current user or for all users on the computer:

    HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

    HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

    Note: There are security settings and group policies that override the HKEY_LOCAL_MACHINE keys with the HKEY_CURRENT_USER keys. In this case, modify the Remote Desktop settings in the HKEY_CURRENT_USER registry key.

  4. Create a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2:

    Modify the registry settings on your local (controlling computer) so that minimizing the Remote Desktop window does not affect the GUI of the controlled computer

    Click the image to enlarge it.

  5. On the 64-bit version of Windows, you may have to repeat the previous step for one of the following keys. Similarly, which key to choose depends on whether you want to edit the settings only for the current user or for all users:

    HKEY_CURRENT_USER\Software\Wow6432\Microsoft\Terminal Server Client

    HKEY_LOCAL_MACHINE\Software\Wow6432\Microsoft\Terminal Server Client

  6. Close the Registry Editor.

Now when you minimize the Remote Desktop Connection window on your computer, this will not affect the remote computer’s GUI and the GUI will be available to your automated tests.

Known issues

Creating the RemoteDesktop_SuppressWhenMinimized Registry value causes issues with Microsoft Lync. For instance, Lync may fail to share screens.

See Also

Running TestLeft Tests via Remote Desktop
Running TestLeft Tests on Remote Computers

Highlight search results