0 Shares 1669 Views 10 Comments

Execute Tests on Remote Desktop when minimized

Apr 26, 2014
1669 Views 10

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.

regedit

 

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

RDP

  • The Remote Desktop Connection dialog box appears.Click the computer icon in the upper-left corner of the title bar, and then click About.

rdpabout

 

 

 

You may be interested

Setting up Mobile Automation Project in Windows
Katalon Studio
77 views
Katalon Studio
77 views

Setting up Mobile Automation Project in Windows

Saket - Sep 20, 2017

This tutorial explains how to setup a mobile automation project and test a mobile app using Katalon Studio on Windows. This tutorial assumes that you are familiar…

Katalon Studio GUI Overview
Katalon Studio
147 views2
Katalon Studio
147 views2

Katalon Studio GUI Overview

Saket - Sep 14, 2017

GUI Overview After installing and setting up Katalon Studio for your automated test, you must understand the GUI. In this post we will walk you through the…

LeanFT Tutorial #4: Application Model Overview
LeanFT
125 views1
LeanFT
125 views1

LeanFT Tutorial #4: Application Model Overview

Saket - Sep 10, 2017

In this post we are going to focus on Application Model in LeanFT. Refer our earlier posts on LeanFT Getting Ready with LeanFT Browser Extensions and Settings…

10 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 ?

    Reply
    • 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?

      Reply
  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 ?

    Reply
    • 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.

      Reply
      • 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 ?

        Reply
        • 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.

          Reply
          • 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

    Reply

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...