Run a test using UFT installed on a remote computer
Relevant for: GUI tests and components and API testing
This task describes how to run UFT tests using UFT installed on a remote computer.
Note: This feature is not supported in the Microsoft Windows® XP environment or the Hyper-V virtualization server.
You can run tests using UFT installed on a remote Windows machine in the following ways:
|Manually log in to the remote machine||
Run UFT and UFT tests from a remote computer so that you can use your own local computer for other tasks.
You can then close the remote session or allow the remote computer's screen to lock. The test continues to run.
No manual log in to the machine
External tools connect to the UFT computer remotely, start UFT, and run tests, without any manual intervention.
This is helpful when running tests via tools such as ALM, Jenkins, or scheduled programs using the UFT Automation Object Model (AOM).
Configure UFT for remote connections
To enable you to run or continue to run tests using UFT installed on a locked, logged off, or disconnected remote computer:
- Open UFT. You can access it directly on the computer where it is installed, or connect to that computer using a remote desktop client, such as Windows Remote Desktop Connection.
In the Options dialog box, open the Run Sessions pane (Tools > Options > General tab > Run Sessions node).
Select Enable testing on locked, logged off, or disconnected remote computers and save your changes.
Enter the credentials to use for the remote session. These might be the same credentials you use to access the remote computer.
Scroll down and click Check Connection to verify that it works.
UFT uses these credentials in the following situations:
- You were connected and running tests when the screen locked or you closed the session.
- When you disconnect, log off, or restart the UFT machine, a Windows session is automatically started, using these credentials to log in. This enables other programs to run UFT remotely without anyone manually logging in to the machine.
Run UFT and UFT tests in a remote session you open manually
To run tests on UFT over a remote connection that you open manually:
Open a session on the remote computer using a remote desktop client, such as Windows Remote Desktop Connection.
On the remote computer, open UFT and make sure UFT is configured to Enable testing on locked, logged off, or disconnected remote computers (Tools > Options > General tab > Run Sessions node).
Run your test.
While running tests over a remote connection that you opened manually, you can allow the screen to lock or close your remote session. However, do not log out of the remote computer or close UFT.
Once you configure UFT for remote connections, you can automate test runs using the Windows Task Scheduler on the remote computer. The Windows Task Scheduler task can run even when no one is manually logged in to the remote machine. The task uses the Windows session that was started using the credentials you defined in the UFT configuration, starts UFT and runs the tests.
Setting the resolution on the UFT computer
If your test requires a specific resolution to be set on the computer, keep the following in mind.
If you set a specific resolution using a Remote Desktop Connection and then disconnect, the resolution settings are not used in subsequent session.
Do one of the following instead:
- Configure UFT for remote connections, set the computer's resolution using a Remote Desktop Connection, and restart the computer before disconnecting.
- Log in directly to the UFT computer and configure the resolution without using a remote connection.
If you are using an RDP client version 6.0 or later and want to run UFT in a minimized RDP session, you must first update a registry value on your local computer (the machine running the Remote Desktop client).
Update the registry key value
Open the Registry Editor and access the RemoteDesktop_SuppressWhenMinimized registry key in one of the following locations:
32-bit operating systems <HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE>\Software\Microsoft\Terminal Server Client 64-bit operating systems <HKEY_CURRENT_USER>\Software\Microsoft\Terminal Server Client
If the key does not yet exist, create it, and give it a DWORD value type.
Set the data for this value to 2.
If you are already running a remote session, restart the session for this setting to take effect.
- Known issues - Remote UFT run sessions