Timeout problem running WatiN tests as part of TFS build

南笙酒味 提交于 2020-01-02 17:16:33

问题


I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy.

I've set the test timeout to 3 minutes which should be plenty.

I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account.

I'm using Visual Studio/TFS 2008 on Windows Server 2008.

Has anyone else hit this problem and found a solution?


回答1:


I've only used WatiN on Vista, which had a similar timeout problem. I was much happier when I switched to FireFox for my tests.

Anyway, here is a possible solution:

http://msdn.microsoft.com/en-us/magazine/dd744751.aspx

The ASP.NET Development Server only listens for requests on IPv4, not IPv6. If you are running Windows Vista or Windows Server 2008, 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. To resolve this issue, comment out the IPv6 localhost address in your C:\Windows\System32\drivers\etc\hosts file. This is the line with "::1 localhost".




回答2:


I found the solution to this - it was to turn off "IE Enhanced Security Configuration" for Administrators.

Next problem is that WatiN thinks it is not running in a STA thread - I'll post a separate question on that.



来源:https://stackoverflow.com/questions/923629/timeout-problem-running-watin-tests-as-part-of-tfs-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!