Execute Tests on Remote Desktop when minimized
Those who work or execute their tests on virtual machines, can understand this better that how big pain is this to execute tests on remote desktop. We all are aware now that the three states mentioned below are not supported by almost any of the automation tools.
- Replay when machine is locked.
- Replay when machine is not logged.
- Replay when machine is minimized.
When running QTP scripts (or UFT GUI scripts) on a remote machine using a Remote Desktop Connection session (RDC) or using Citrix, if the remote session is minimized during the run session, or if the computer on which the application is being tested is logged off or locked, the following problems may occur:
- the test or component run session may fail
- steps that contain keyboard or focus operations may fail
- the Test Results still image capture and/or the Screen Recorder may display a black screen
- steps for which the device level replay is configured to use the mouse (instead of browser events) to run mouse operations may fail. (You set the device level replay using a Setting.WebPackage(“ReplayType”) statement or by setting the Replay type option in the Advanced Web Options dialog box.)
The only workaround for these mention problem is to not to minimize the session window, If you are using Citrix or a Remote Desktop Connection session to run a test or component, and make sure that the computer on which the application is being tested is not logged off or locked.
One of these problems to run when session window is minimized is now addressed with RDP 6.0. That means, QTP scripts (or UFT GUI scripts) can now be executed on remote desktop and we can keep the session window minimized. Note that this is not the feature of QTP/UFT, instead this is something which is enabled now in RDP 6.
Follow the steps below to enable this for your RDP sessions.
Close any open Remote Desktop session
If the registry key does not exist, create the RemoteDesktop_SuppressWhenMinimized registry value (DWORD type) in one of the following registry paths:HKEY_CURRENT_USER\Software\Microsoft\Terminal ServerClient\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\
Set the data for this value to 2.
How to check your Remote Desktop (RDP) client version:
- To open Remote Desktop Connection, click Start, point to All programs > Accessories >Communications, and then click Remote Desktop Connection. on Widows 8, find it under apps
- The Remote Desktop Connection dialog box appears.Click the computer icon in the upper-left corner of the title bar, and then click About.