Can TestComplete execute tests when the computer is locked?
A.: Tests that do not interact with GUI (for example, regression tests) 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.
The Remote Desktop Connection is a built-in feature of the operating system. In order to use it, the workstation that TestComplete is running on 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.
To run tests via the Remote Desktop Connection:
- Lock the workstation where TestComplete is installed.
- Log onto the TestComplete workstation via the remote desktop connection from another computer.
- Start executing 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.
||When running GUI tests via Remote Desktop, do not disconnect from the Remote Desktop Connection session or lock the computer. Otherwise, the tests will fail. Also keep in mind that if you minimize the Remote Desktop window, the operating system switches the Remote Desktop session to the GUI-less mode and does not draw the GUI. In this case, TestComplete fails to interact with the GUI and the test fails.
For information on how to run GUI tests while the Remote Desktop window is minimized, see Running Tests in Minimized Remote Desktop Windows. For information on how to disconnect from the remote desktop session, see Disconnecting From Remote Desktop Session While Running Automated Tests.
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 on a virtual machine. 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 executing 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.
It is possible to run tests on locked computers using network suites; locked computers being slave hosts. However, this approach requires that TestComplete or TestExecute be 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).
- 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 in to the locked slave computer using the specified account and run tests on that computer. You can configure the network suite settings so that the remote computer closes the user session or shuts down automatically at the end of the test run.
© 2015 SmartBear Software. All rights reserved.
Send feedback on this document