No Tests Execute on Locked Machine
When I disconnect from and/or lock the machine that acts as my Execution Server, no scheduled tests are executed. This includes Remote Desktop Sessions that are minimized or closed. The following error may appear for tests with dialog handling:
From version 2014.1.428
UnsupportedNonInteractiveOperationException(additional information about the exception).
System.NullReferenceException: Object reference not set to an instance of an object.
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
Is it possible for tests to execute normally without requiring my account to always be logged in on that machine?
Any test that requires moving the mouse or sending key strokes requires an unlocked desktop. Telerik tests are not the only types affected by this Windows limitation. You will find this is a general problem with any tool that performs UI testing.
Our tests against HTML-based web applications frequently can work on a locked machine because most test steps don't use the mouse or keyboard. Instead they are able to inject Click or Select events against the element in question (e.g. a button or drop-down select). Unfortunately Silverlight and WPF applications do not allow us to inject these events. We have to simulate system wide mouse moves, clicks, and key presses instead.
Ensure all the following conditions are met for the server on which the tests will be executed:
- Test agent is running as an interactive process and not as a service (you must specify a user name and password for the agent to log on).
- There is an active logon session on the test server for the user mentioned above.
- The test server is not locked, on standby, nor hibernated when the test executes.
- Browser is not minimized during test execution.
Some of our customers report success using the following work-arounds:
- Use a VNC product. With this they remotely connect to the test machine, leave the user logged on, but disconnect the VNC connection. This leaves the Windows session open and unlocked, but humans still cannot access it without reconnecting the VNC connection (which usually means re-authenticating).
- Keep an Active Session Running on the server.
- Set registry keys to work with a Minimized Remote Desktop Connection.