在 TeamCity 上运行 Watin
我尝试通过 TeamCity 运行简单的 Watin 测试,但 Internet Explorer 窗口从未像通常通过 CruiseControl 那样显示。
我收到错误消息,提示找不到文本字段,因此某些内容正在运行。 但没有窗户我就看不到什么。
我需要对 TeamCity 服务器的设置进行特定更改吗?
I'm trying to run a simple Watin test through TeamCity but the Internet Explorer window is never shown as is usually is via CruiseControl.
I get an error that it can't find a text field so something is running. But i can't see what without the window.
Is there a specific change to the setup of TeamCity server that I need to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在另一个论坛上找到此内容
所有积分均归 Matt Baker
供任何尝试运行 WatiN 的人将来参考使用 TeamCity 自动测试。 您必须使用
\bin\agent.bat start
启动构建代理,而不是作为服务。 WatiN 需要完整的 UI 才能正确执行,并且它不会将此环境作为服务获取。 我希望这对其他人来说更容易!Found this on another forum
All credits go to Matt Baker
For future reference to anyone who attempts to run WatiN tests automatically using TeamCity. You must start your build agent using
\bin\agent.bat start
and NOT as a service. WatiN requires a full UI to execute properly and it doesn't get this environment as a service. I hope this makes it easier for other people!如果您安装为服务,请确保停止并禁用它。 然后,使用以下内容创建一个 .bat 文件
现在只需在启动文件夹中创建此批处理文件的快捷方式即可!
If you installed as a service, make sure to stop it and disable it. Then, create a .bat file with the following
Now just create a shortcut in your start up folder to this batch file!
开始(取决于你的团队所在城市
安装路径)
start (depending on your teamcity
installation path)
请尝试这个简单的解决方案:
转到服务,编辑服务的属性,选择登录选项卡,然后选中带有标签的框:“允许服务与桌面交互”。
在竹子里为我工作。
干杯,
佩德罗·莫莱罗
Please try this simple solution:
Go to services, edit the properties of your service, select the LogOn Tab, and check the box with the label: "Allow service to interact with desktop".
Worked for me in bamboo.
Cheers,
Pedro O Moleiro
在 Teamcity Agent 的服务属性窗口 (
services.msc
) 的“帐户”选项卡下,选中“允许服务与桌面交互”,这将允许本地服务帐户生成 Internet Explorer。 但您肯定会遇到其他问题,例如 cookie 阻止、密码保存等。因此,以本地服务身份登录并修复这些问题。最简单的方法是使用
psexec
(http:// /technet.microsoft.com/en-us/sysinternals/bb897553.aspx),调用psexec -i -s cmd.exe
生成一个以本地帐户运行的 cmd,然后启动 Internet浏览器设置一切(IE 中本地帐户的隐私设置非常高)。Under Account tab on the Teamcity Agent's Service property window (
services.msc
), check "Allow service to interact with desktop", that will allow local service account to spawn internet explorer. But you will most certainly get stuck with other stuff, like cookie blocking, password saving etc. so login as local service and fix those stuff.Easiest way to do that is with
psexec
(http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx), callpsexec -i -s cmd.exe
so spawn a cmd running as local account, then start internet explorer at setup everything up (the privacy settings in IE for local account is extremely high).