通过TFS在Windows 2008 Server华廷 [英] WatiN through TFS on Windows 2008 Server

查看:192
本文介绍了通过TFS在Windows 2008 Server华廷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过持续构建TFS上运行华廷测试,但我不能得到它的工作。我得到的errror是以下内容:

I'm trying to run WatiN tests through continuous build on TFS, but I can't get it to work. The errror I get is following:

WatiN.Core.Exceptions.IENotFoundException : Could not find an IE window matching constraint: Timeout while waiting to attach to newly created instance of IE.. Search expired after '30' seconds.
     at WatiN.Core.IE.CreateIEPartiallyInitializedInNewProcess()
     at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
     at WatiN.Core.IE..ctor(String url, Boolean createInNewProcess)

我读过,这可能是原因

I've read that this may be the cause of

  • 请求本地主机将解决 以:: 1默认情况下,IPv6地址 而非的IPv4地址 127.0.0.1,华廷测试将失败。
  • Requests for "localhost" will resolve to the IPv6 address of ::1 by default rather than the IPv4 address of 127.0.0.1 and the WatiN tests will fail.

这是不是这样的,因为我是测试对公用URL没有在本地计算机上。

This is not the case, because I'm testing against a public URL not on the local machine.

  • 在IE增强安全配置打开

我已经没有任何结果竟然这一关。

I've turned this off without any result.

  • 在缺少文件Microsoft.mshtml.dll,Interop.shdocvw.dll或Watin.Core.dll

检查并仔细检查!我有没有在我的输出目录中的测试运行。

Check and double check! I have those in my output directory where the tests are run.

最后一个和最后的测试是登录为运行构建和执行NUnit的测试套件的用户,并用手运行测试。

The last and final test was to login as the user that runs the build and executes the NUnit testing suite and run the tests by hand.

C:\Users\TFSSERVICE>"C:\Program Files\Nunit 2.5.2\bin\net-2.0\nunit-console.exe"
 /nologo C:\Users\BUILDSERVICE\AppData\Local\Temp\\Continuous\Binaries\Release
\\WebTests.dll

你猜怎么着!它的工作原理手动执行它们作为TFS生成用户。那么,究竟我在这里丢失?有什么想法,为什么它只是不断超时,当我通过MSBuild引擎运行?

Guess what! It works executing them manually as the tfs build user. So, what am I missing here? Have any ideas why it just keeps timing out when I run through the msbuild engine?

任何想法,欢迎! 的Mikael

Any thought are welcome! Mikael

推荐答案

由错误判断,它是寻找一个优价资源管理器窗口。它将无法找到如果生成过程是由服务运行。

Judging by the error, it is looking for an Intenet Explorer window. Which it won't be able to find if the build process is being run by a service.

编辑:previously我说我不知道​​如何解决这个问题
。 虽然我不这样做,<一个href="http://blogs.msdn.com/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx">this页面一样。查找标题为自动化UI测试。这应该也能成为华廷工作。

Previously I said I didn't know how to fix this.
Although I don't, this page does. Look for the section titled "Automated UI Tests". This ought to work for WatiN as well.

这篇关于通过TFS在Windows 2008 Server华廷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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