2016-04-06 92 views
2

我有一個NUnit測試項目,我有一個簡單的測試方法,使用WebDriver在頁面上查找元素。TeamCity和Selenium WebDriver

我可以在VS2015中運行測試方法,沒有問題。然後,我試着用這樣的構建步驟打造TeamCity的這個項目(9.1.6):

Runner type: NUnit 
NUnit runner: NUnit 3 
Path to NUnit console runner: packages\NUnit.ConsoleRunner.3.2.0\tools\nunit3-console.exe 

我收到以下錯誤,當TeamCity的嘗試執行構建步驟:

[Web.Test.FindPage] OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:64963/session/27d5b5b821e3b90c9d6f8183f05a3d05/element timed out after 60 seconds. 
    ----> System.Net.WebException : The operation has timed out 

兩個TeamCity服務器和代理被配置爲在服務帳戶下運行的Windows服務。

有什麼我失蹤?

回答

2

原來,我無法將生成代理運行爲Windows服務。我必須在控制檯中運行它。一旦我這樣做,問題就解決了。

+0

有關它在TeamCity文檔中的更多信息:https://confluence.jetbrains.com/display/TCD9/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-Configureautomaticbuildagentstart –