|Hints on setting up test-systems|
This chapter provides some hints how to set-up your test-systems and processes in order to get a stable test execution.
|Using the task scheduler|
In order to execute tests or similar processes on a regular basis it is very common to set-up a Windows service. Unfortunately those services have the disadvantage that they don't run in an active Windows user session. Because of this such processes should never be started as services, because running GUI tests without an active user session brings up very subtle problems during test-execution. You can find further technical details at FAQ 14.
We recommend to define a scheduled task via the task scheduler instead of using services. This can be directly applied via the graphical UI of the task scheduler. The following instruction should work on Windows 7, Windows 8, Windows 8.1 and Windows 10. There might be a few differences depending on the exact operation system:
It is very important that the user which is configured to run that process is logged in correctly. This user can be logged in manually or automatically (see section 35.3). It is recommended to use a virtual system for running GUI tests. On such virtual systems the user needs to be logged in only on the guest system and the host can be locked.
|Remote access to Windows systems|
Accessing remote Windows systems via RDP is subject to some restrictions and requires a dedicated configuration of your systems. That's because the implemented RDP server of Windows desktop versions allows only one active user. Thus the (virtual) monitor will be locked as soon as you access the system via RDP. After closing the RDP session the monitor of the test-system remains locked. Usually you cannot use a graphical user interface at a locked screen, thus you cannot test it, too.
NoteOn Windows 10 or Windows Server 2016 systems you can make use of RDP if you modify
Therefore navigate to
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client or
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client and add a new value
DWORD having the value
Once that setting has been set you are allowed to minimize RDP connections, but you have to keep
the connection alive. The tests will still fail if you disconnect or close the session.
Instead of this approach you should use the capabilities your virtual server provides. For VMware server the vSphere client would be the first choice. With VirtualBox you can connect to VirtualBox with RDP (not with the Windows client). Of course this kind of RDP connection has not the impacts on the test-system as explained above.
|Automated logon on Windows systems|
A simple possibility to get an active user session is to logon a test user automatically after start-up of your system. This chapter describes how to configure your system for that purpose.
Note An automatic logon at Windows is always a security risk. Therefore you have to ensure that the corresponding test-systems are not accessible from outside the test environment.
Although this guidance is generally valid it will be used commonly together with virtual systems which will be accessed remotely. What to keep in mind for this remote access will be explained at section 35.2.
The following method is running with Windows 7, Windows 8, Windows 8.1 and Windows 10. There might be a few differences depending on the exact operation system:
Of course also other methods exist to get the same result. Thus you could modify the corresponding registry entry directly. Or you could download the 'Autologon' tool from Microsoft from https://technet.microsoft.com/en-us/sysinternals/bb963905. But all those different methods lead to the same result, which is the modified registry entry. We recommend to use the method explained above as in this way no download is needed and a type mismatch in the registry entry is avoided. By the way, an automated logon will never run for domain users. In fact this would be quite awkward in conjunction with test-system. This may be an information which may calm your administrators down.
|Test execution on Unix|
On Unix systems you can set-up virtual displays using tools like VNC server. A very useful window manager for those displays could be xfce.
|Last update: 02/13/2019
Copyright © 1999-2019 Quality First Software GmbH