我正在使用 firefox webdriver 运行 firefox 41.0.2 Nunit 3.4.1 selenium 2.47.0 specflow 2.1.0 我的测试并行运行。
几天过去了,我的测试在通过 jenkins 运行时未能完成,运行卡在一个进程上并且无法继续运行的其余部分。在运行 20 多个场景时,我间歇性地能够在本地重现错误。我收到以下异常,以前有人见过这个问题吗?
OpenQA.Selenium.WebDriverException :抛出一个带有空响应的异常,将 HTTP 请求发送到远程 WebDriver 服务器的 URL http://localhost:7056/hub/session/d0a83b9c-bd79-4218-8eac-dc8b273f8f40/element/% 7B84966a91-06c4-42dd-98c0-278ed35e3667%7D/属性/值。
异常状态为 ConnectFailure,消息为:无法连接远程服务器 ----> System.Net.WebException : 无法连接远程服务器 ----> System.Net.Sockets.SocketException : 无法建立连接,因为目标机器主动拒绝它 127.0.0.1:7056
+++++++++++++++++++ 堆栈跟踪:在 OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) 在 OpenQA.Selenium.Firefox.FirefoxDriverCommandExecutor.Execute(Command commandToExecute)在 OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters) at OpenQA.Selenium.Remote.RemoteWebElement.GetAttribute(String attributeName) at TeamHours.Automation.StandAlone.WebComponents.Pages.WeeklySalesForecastPage.<Save>b__0(IWebElement s) in c:\Program Files (x86)\Jenkins\jobs\Automation Build Develop\workspace\TeamHours.Automation.StandAlone.WebComponents\Pages\WeeklySalesForecastPage.cs:line 38 at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() 在 System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func
2 谓词)在 TeamHours.Automation.StandAlone.WebComponents.Pages.WeeklySalesForecastPage.Save() in c:\Program Files (x86)\Jenkins\jobs\Automation Build Develop\workspace\TeamHours.Automation.StandAlone.WebComponents\Pages\WeeklySalesFore .cs:line 39 at TeamHours.Automation.StandAlone.CommonSteps.Steps.SalesForecast.WeeklySalesForecastGraphsSteps.WhenISaveTheForecast() in c:\Program Files (x86)\Jenkins\jobs\Automation Build Develop\workspace\TeamHours.AloneCommon.Automation. \Steps\SalesForecast\WeeklySalesForecastGraphsSteps.cs:TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) at TechTalk.SpecFlow.Infrastructure.cs:line 73 BindingMatch 匹配,Object[] arguments) at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() at TeamHours.Automation.StandAlone.RegresionTests.Features.Schedule.ScheduleGraphFeature.ScenarioCleanup() in c:\Program Files (x86)\Jenkins\jobs\Automation Build Develop\workspace\TeamHours.Automation.StandAlone.RegresionTests\Features\Schedule\ScheduleGraph.feature.cs:在 TeamHours.Automation.StandAlone.RegresionTests.Features 的第 0 行。 Schedule.ScheduleGraphFeature.VerifyScheduleGraphShowsCorrectPeopleAndOverstaffedWhenDemandIsExceeded(字符串角色,字符串选项卡,字符串链接,字符串noOfItems,字符串peopleRequired,字符串itemsOrSales,字符串tab2,字符串视图,字符串总计,字符串tab3,字符串type1,字符串type2,字符串type3,String[] exampleTags) in c:\Program Files (x86)\Jenkins\jobs\Automation Build Develop\workspace\TeamHours.Automation.StandAlone.RegresionTests\Features\Schedule\ScheduleGraph.feature:line 133 --WebException at System.Net .HttpWebRequest.GetResponse() at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) --SocketException at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean) connectFailure、Socket s4、Socket s6、Socket&socket、IPAddress& 地址、ConnectSocketState 状态、IAsyncResult asyncResult、Exception&异常)第 133 行 --WebException at System.Net.HttpWebRequest.GetResponse() at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) --SocketException at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception&异常)第 133 行 --WebException at System.Net.HttpWebRequest.GetResponse() at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) --SocketException at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception&异常)Socket s4、Socket s6、Socket&socket、IPAddress&地址、ConnectSocketState状态、IAsyncResult asyncResult、Exception&异常)Socket s4、Socket s6、Socket&socket、IPAddress&地址、ConnectSocketState状态、IAsyncResult asyncResult、Exception&异常)
我们发现此问题可能与主机上的 TCP 端口耗尽有关。还有其他关于此的材料,但基本上网络驱动程序会耗尽所有端口,由于驱动程序轮询操作系统以获取可用端口,因此它们陷入等待状态。该修复涉及修改注册表以增加可用端口的数量或减少它们处于等待状态的时间。
归档时间: |
|
查看次数: |
18073 次 |
最近记录: |