除非 RDP 连接打开,否则 Silverlight 测试无法工作
我有一些 Silverlight UI 测试,正在使用 White 进行自动化。这些测试随后由 TFS 构建代理运行,该代理以交互方式运行,以便可以访问桌面。
如果在运行测试时向构建代理打开远程桌面连接,则构建会通过;我可以看到鼠标指针在移动。当测试单击 HyperlinkButton 时,会发生导航,并随后通过测试中的断言进行验证。
如果在运行测试时没有向构建代理打开远程桌面连接,则构建会失败。 Internet Explorer 窗口已创建,Silverlight 应用程序已加载,但没有发生任何点击;应用程序保留在初始页面上,测试断言随后失败。
有没有人找到解决这个问题的方法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅在交互式会话中启动 Windows 服务
(如果您是)设置 Windows 服务时,可以将该服务设置为与交互式桌面一起运行,尽管它将作为本地计算机用户而不是域用户运行。
另一种选择是调整注册表以使用 AutoAdminLogon 功能。谨慎使用!
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon:
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:
答案就在此 CodePlex 线程上。基本上没有解决办法;白测试必须由登录用户运行(物理方式或通过 VNC 或 RDP)。
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).