Articles

[Collapse]TestComplete FAQ
 [Expand]Writing Automated Test Script Code
 [Expand]Working With Files, Databases and Excel Sheets
 [Expand]Web Testing - Functional Testing of Web Pages
 [Expand]TestComplete Trial Version Questions
 [Expand]Test Log and Results
 [Expand]Supported Applications, Operating Systems and Development Tools
 [Expand]Recording, Running and Debugging Automated Tests
 [Expand]Objects, Files and Images Comparison
 [Expand]Miscellaneous
 [Expand]Licensing Questions/viewarticle/18490/
 [Collapse]General Questions About Automated Testing
   Are there checkpoints available in TestComplete?/viewarticle/8804/
   Can I perform distributed testing with TestComplete?/viewarticle/8805/
   Can I test grid controls with TestComplete?/viewarticle/8806/
   Can TestComplete execute scripts when the computer is locked?/viewarticle/8807/
   Does TestComplete handle exceptions in the application under test?/viewarticle/8808/
   Does TestComplete have something like Object Repository?/viewarticle/8809/
   Does TestComplete have test management functionality?/viewarticle/17625/
   How can I increase the test execution speed?/viewarticle/8810/
   How can I start TestComplete scripts one by one?/viewarticle/8811/
   How can I work with TestExecute?/viewarticle/8812/
   How do I compile TestComplete tests into an executable?/viewarticle/8813/
   How to create tests that will not change if the application's UI changes?/viewarticle/8814/
   Is it possible to execute TestComplete tests from MSBuild projects?/viewarticle/8815/
   My application crashes without any messages or error windows. Can TestComplete help me find the cause of the crash?/viewarticle/8816/
   What is regression testing? How should I perform regression tests?/viewarticle/8817/
   Does TestComplete support load testing?/viewarticle/63914/
 [Expand]Automated Testing Tasks - Basic
 [Expand]Automated Testing Tasks - Advanced
 [Expand]Testing Mobile Applications
 [Expand]Accessing Application's Internal Objects, Methods and Properties
Updated: 3/14/2014 Applies To: TestComplete Rating: ExcellentExcellentExcellentExcellentExcellent 1 vote(s) Click to rate: PoorNot badAverageGoodExcellent
Q.: 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.

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 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.

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 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.
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 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.



© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document