Running Tests on Locked Computers

Applies to TestComplete 14.73, last modified on February 25, 2021
Information in this topic applies to desktop and web applications.

During some time-consuming operations (like regression testing, for example), it may be preferred, for security purposes, to start the test run and lock the computer. Tests that do not interact with GUI can be run on locked computers. GUI tests or tests that simulate user actions cannot be run on locked computers, since when the computer is working in this mode, the user session is frozen (no windows can be shown) and the testing engine cannot simulate user actions.

To work around the problem with tests interacting with GUI, you can use a remote desktop connection, a virtual machine or a network suite.

Using the Remote Desktop Connections

The Remote Desktop Connection is a built-in feature of the operating system. In order to use it, the workstation, on which TestComplete will be running, must have special server-side software. This software may be included in the operating system, like it is included in Windows XP, or it can be a third-party software like VNC or DameWare.

  • Lock the workstation where TestComplete is installed.

  • Log onto the TestComplete workstation via the remote desktop connection from another computer.

  • Start running tests with TestComplete.

TestComplete will function in the remote connection session even if the TestComplete workstation is locked. For more information on using the Remote Desktop to run tests on remote computers, see Running Tests via Remote Desktop.

While running tests that interact with the GUI, do not minimize the Remote Desktop window. If you minimize it, the operating system switches the remote session to the GUI-less mode. In this case, TestComplete cannot interact with the GUI and the tests fail. For information on how to work around this problem and run GUI tests successfully while the Remote Desktop window is minimized, see Running Tests in Minimized Remote Desktop Windows.

Also do not disconnect from the Remote Desktop session. Otherwise, the GUI tests will fail.

Using the Virtual Machine Server Software

To workaround the problem with a locked computer, you can also use Virtual Machine software, VMware server, VMware ESX or Microsoft Virtual server 2005:

  • Install TestComplete and your application to a virtual machine. Also, copy all files that your application and TestComplete project may require for running and testing.

  • Lock the virtual machine’s host computer.

  • Log onto the virtual machine from any other computer.

  • Start running tests.

TestComplete will run tests on the virtual machine despite the host being locked.

Do not disconnect from the virtual machine while running GUI tests, otherwise the tests will fail.
Using the Network Suite

It is possible to run tests on locked computers using network suites; locked computers being slave hosts. However, this approach requires that TestComplete is installed on both the locked computer and the computer that will initiate the test run.

  • Add the NetworkSuite project item to the test project on the computer that will be locked. This project will serve as a slave project of the network suite.

  • Lock the computer.

  • On another computer, create a project with the NetworkSuite project item and add this item to the project’s test items. This project will serve as the network suite’s master project.

  • Add the locked computer to the list of the network suite’s hosts in the master project.

  • Specify the user account to log into the locked computer in the host properties (see Opening User Sessions on Remote Computers).

  • Set the host’s Login mode to Automatic (RDP session) or Automatic (Console session).

    If the host’s Login mode is set to Manual, TestComplete will fail to log into the locked computer.
  • In the master project, add a network suite job with one task that will run the slave project on the locked computer.

  • Run the master project.

TestComplete running on the master computer will log into the locked slave computer using the specified account and run tests on that computer. Note that TestComplete does not log out from the slave computer once the tests are finished.

See Also

Running Tests
Running Tests via Remote Desktop
Distributed Testing

Highlight search results