automationvirtual-machineremote-desktopleanft

Running tests on VM does not work unless window is open


We are attempting to do our testing remotely, so we set up some Virtual Machines to run our GUI tests and to free up our local machines. What we were hoping for was to have the tests run just like they would on a physical machine, however they seem to require an active Remote Desktop Connection up in order to run properly. These tests are written using LeanFT and it is a windows app so this is not mobile GUI testing.

Is there a certain way to configure this VM to set it up properly for automated GUI testing that does not require an active Remote Desktop Connection? It seems as if its sharing the controls on our physical machine..

Or am I completely wrong here.. Is a Remote Machine different than a Virtual Machine? Thanks!


Solution

  • It's possible to run a GUI test without an active Remote Desktop Connection

    I achieved this with leanft through the following 2 steps:

    1. Configure how you execute your tests

    Whether you're running via a Jenkins slave or through another kind of "listener" (maybe ssh, or bamboo, etc.), you need to configure this listener to start after a specific user is logged on.

    In my case I was running through the Jenkins slave, so I've configured the startup of the slave to launch as soon the user logged in.

    1. Tell windows to login the user when the computer starts. You can achieve that via the following registry:

      Windows Registry Editor Version 5.00
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
      "DefaultDomainName"="DOMAIN"
      "DefaultUserName"="USERNAME"
      "AutoAdminLogon"="1"
      "DefaultPassword"="PASSWORD"