Karma在Team City下运行时无法启动IE。我可以登录到服务器并从命令行运行测试,但IE总是从Team City失败:
[Step 6/6] INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
[14:45:09][Step 6/6] INFO [launcher]: Starting browser Chrome
[14:45:09][Step 6/6] INFO [launcher]: Starting browser Firefox
[14:45:09][Step 6/6] INFO [launcher]: Starting browser IE
[14:45:25][Step 6/6] INFO [Firefox 38.0.0 (Windows 7 0.0.0)]: Connected on socket KeIupP7qx6Dn9ghM0KsX with id 75681035
[14:45:32][Step 6/6] INFO [Chrome 43.0.2357 (Windows 7 0.0.0)]: Connected on socket DORZdoNLQzPHx4ZT0KsY with id 61077412
[14:45:37][Step 6/6] INFO [IE 11.0.0 (Windows 7 0.0.0)]: Connected on socket 1p4cEWOQp6eKrUdO0KsZ with id 27572902
[14:45:47][Step 6/6] WARN [IE 11.0.0 (Windows 7 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
[14:45:47][Step 6/6] Chrome 43.0.2357 (Windows 7 0.0.0)
[14:45:47][Step 6/6] Firefox 38.0.0 (Windows 7 0.0.0)
[14:45:48][Step 6/6] Process exited with code 1
我尝试将browserNoActivityTimeout
增加到100000,但这没有帮助。
我们在Windows 2008 R2上运行Team City 8.1.2。
任何建议都将受到赞赏。
答案 0 :(得分:1)
问题在于IE从未在我们用于Team City代理的服务帐户下运行。它被卡在首次运行浏览器时打开的IE选项对话框中。一旦我运行IE并接受了它在构建服务器上运行的默认设置:
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
[09:58:42]INFO [launcher]: Starting browser Chrome
[09:58:42]INFO [launcher]: Starting browser Firefox
[09:58:42]INFO [launcher]: Starting browser IE
[09:59:02]INFO [Firefox 38.0.0 (Windows 7 0.0.0)]: Connected on socket 1uAt8J2B8NPFj66W8Mib with id 61577635
[09:59:02]INFO [IE 11.0.0 (Windows 7 0.0.0)]: Connected on socket RPZgBEUhUGW2wD2h8Mic with id 95872295
[09:59:07]INFO [Chrome 43.0.2357 (Windows 7 0.0.0)]: Connected on socket mZzpKwFkIPpGY3vC8Mid with id 7944928
[09:59:08]Chrome 43.0.2357 (Windows 7 0.0.0)
[09:59:08]Firefox 38.0.0 (Windows 7 0.0.0)
[09:59:08]IE 11.0.0 (Windows 7 0.0.0)
[09:59:08]Process exited with code 0
答案 1 :(得分:1)
@Kevin Kuszyk,你的解决方案也适合我。
问题是,Internet Explorer 11会在每次启动它的用户第一次启动时显示一个对话框窗口。
解决方案: 手动启动IE作为TeamCity用户。
为了启动Internet Explorer作为您配置为运行TeamCity的服务用户,在IE上运行shift + right click
并选择在菜单中以不同用户身份运行。将显示登录栏窗口 - 登录并继续。登录后,浏览器将启动并通过对话框提示您。选择所需选项并继续(提示,禁用安全性)。下次启动Internet Explorer时,该对话框将不会显示,因此Karma将能够运行其测试套件。
如果您将TeamCity作为本地系统运行,它有点棘手,因为您必须从Microsoft下载psexec,然后在powershell中执行以下命令以启动Internet Explorer:
psexec -sid "C:\Program Files\Internet Explorer\iexplore.exe"