除非打开RDP连接,否则Silverlight测试无法正常工作 [英] Silverlight tests not working unless RDP connection open

查看:96
本文介绍了除非打开RDP连接,否则Silverlight测试无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用White自动化的Silverlight UI测试.这些测试随后由TFS构建代理运行,该代理以交互方式运行,因此可以访问桌面.

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.

如果在运行测试时打开了与构建代理的远程桌面连接,则构建通过.我可以看到鼠标指针在四处移动.当测试单击HyperlinkBut​​ton时,将进行导航,随后将通过测试中的断言对其进行验证.

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.

如果在运行测试时没有打开与构建代理的远程桌面连接,则构建失败.创建Internet Explorer窗口并加载Silverlight应用程序,但是没有点击发生;该应用程序仍保留在初始页面上,并且测试断言随后失败.

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?

推荐答案

请参见如果要设置Windows服务,则可以将该服务设置为与交互式桌面一起运行,尽管它将以本地计算机用户而不是域用户的身份运行.

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.

另一种选择是调整注册表以使用AutoAdminLogon功能.谨慎使用!

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

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

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

  • DefaultUsername
  • DefaultPassword
  • DefaultDomain
  • AutoAdminLogon = 1

这篇关于除非打开RDP连接,否则Silverlight测试无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆