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.

  1. Close any open Remote Desktop session
  2. 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\
    or
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\
  3. 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.
See also  UFT is now UFT One 15.0

 

 

 

 

17 COMMENTS

  1. Hi Saket,
    I am having all the above issues. And by following the steps,which you have given also, its not working.

    Moreover, i will be invoking my tests from bamboo. So, in that case, anyone can trigger the test. In that case, the above workaround may not be working,right ?

    • Ideally when your test will be triggered through bamboo, Window minimize will not happen as the agent will be solely for the execution. however if you trigger in on your local this might be the case. Which OS your on?

  2. Hi Saket,

    I am having the same issue. I am automating a desktop based application. I invoke my test from Teamcity. We generally exeucte our tests on a physical machine(placed somewhere else) but we access that machine through RDP.

    Also.. your statement :
    •Replay when machine is locked.
    •Replay when machine is not logged.
    •Replay when machine is minimized.

    so the ‘machine’ word refers to Virtual machine or the local machine from where we are accessing the Vritual machine?

    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

    Here the ‘Session Window’ is refering to browser window or the vritual machine window ?

    • Hi DJ,

      Here I am referring to a virtual machine or any other physical machine in your network which you can RDP on. Session Window is also being referred to RDP session window.

      • Ok.. I need to be careful with the machine Which I got connected using RDP ?

        Also, any other possibility why the scripts are getting stuck or failed ?

        Do you think invoking scripts through TeamCity can also be a problem ?

        • Do you have any mouse replay option in your script or any Key Stroke operation? If so that might be causing the issue. I don’t think TeamCity would be the problem.

          • I believe there are no key Stroke or Mouse Replay option. Still I will have a look.

            Sir, I have one more issue that is, If I execute my scripts on machine connected with RDP and due to some reason the Javawindow(Java based Desktop application) gets minimized…. so the scripts fail when my RDP machine is also minimized.

            But however If I am active on that RDP mahcine(not minimized) my scripts works absolutely fine even though javawindow is minimized.

            I tried couple of solution that is to Activate the Javawindow, maximize the window, highlight the window before performing any operation but didn’t work. It fails even though the activate, maximize and highlight steps are passed.

            Please help me with the solution, I am stuck badly. 🙁

          • does these operation work , when you are active on machine?
            “Activate the Javawindow, maximize the window, highlight the window before performing any operation but didn’t work.”

  3. Hi Sir,

    Yes this operations work perfectly fine when I am active on machine.

    Sir I have one more questions related to Java9. Does UFT supports Java9?? Our application soom will be moving to Java9. Currently it is on Java8

  4. Hi,

    I’m not sure if this is the right place to ask my question.
    Need your suggestion on Bamboo and ALM integration. End goal is to execute automation scripts (UFT) placed in ALM. Bamboo server is running standalone and do not want to execute tests locally on bamboo server due to high usages for build & deploy. Currently test scripts are executed on different VM’s which are manually triggered from ALM.
    Thanks! M.A

  5. Hi There,

    I am unable to see the screenshot in execution report. I am running scripts from UFT installed in Terminal server through a RDP. I did all registry key update. But still same error. Can you provide some input on this,pls

    • Hi Chitaranjan, can you please try updating registry with below

      HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
      DWORD: RemoteDesktop_SuppressWhenMinimized = 2

      HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client\
      DWORD: RemoteDesktop_SuppressWhenMinimized = 2

  6. Hi ,

    I have created dword under hkey current user but I don’t have terminal server client key under hkey_localmachine ? Is creating one dword is enough ?

  7. @saket some steps are failing when running the UFT test through ALM , but it is passing when we are keeping the remote session open. Any idea?Please suggest

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.