1

I have a few Silverlight UI tests that I'm automating with White. These tests are subsequently run by a TFS build agent, which is running interactively so it can access the desktop.

The build passes if I have a Remote Desktop connection open to the build agent as the tests are run; I can see the mouse pointer moving around. When the test clicks on a HyperlinkButton navigation takes place, and is subsequently verified by assertions within the test.

The build fails if I do not have a Remote Desktop connection open to the build agent as the tests are run. The Internet Explorer window is created and the Silverlight app loads, but no clicks happen; the application remains on the initial page and test assertions subsequently fail.

Has anyone out there found a solution to this problem?

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
Duncan Bayne
  • 3,870
  • 4
  • 39
  • 64

2 Answers2

0

The answer is on this CodePlex thread. Basically there is no solution; White tests must be run by a logged-in user (either physically, or via VNC or RDP).

Duncan Bayne
  • 3,870
  • 4
  • 39
  • 64
0

See Starting a Windows service in an interactive session

If you are setting up a windows service, that service can be set to run with an interactive desktop, though it will be running as a local machine user and not a domain user.

The other alternative is tweaking the registry to use the AutoAdminLogon feature. Use with caution!

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon:

  • DefaultUsername
  • DefaultPassword
  • DefaultDomain
  • AutoAdminLogon = 1
Community
  • 1
  • 1
Tom E
  • 2,519
  • 2
  • 17
  • 22
  • I'll use AutoAdminLogon, I think. The machine in question is a well-segregated VM that's used solely for building and testing within the development environment. I tried setting up the service to interact with the desktop, but that isn't enough; while the service could then create windows, White was still unable to interact with them without an active session. – Duncan Bayne Mar 25 '10 at 21:59