我在套房里有大约90个奇怪的场景。每当我在一些持续集成(CI)构建上执行测试时,会弹出所有测试用例的错误。但是,当我重新启动我的mac机器并在CI环境中启动Appium时,一切正常。
如果我没有更改任何配置,我无法确定为什么会出现此错误。没有硬件/连接问题。每次成功运行之后......然后我需要问一些身体上的人重新启动测试环境然后我能够成功执行它。
Plz帮助分析问题。由于在CI环境中执行测试的整个想法都被打败了。
OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://10.2.2.26:4723/wd/hub/session timed out after 60 seconds.
----> System.Net.WebException : The operation has timed out
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Appium.AppiumDriver`1..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Appium.iOS.IOSDriver`1..ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities, TimeSpan commandTimeout)
at GEHealthcare.MM.Test.AutomationFramework.Driver.GetDriver(String platformVersion, String PRODiceName, String udid, String appPath, String serverUri) in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AutomationFramework\Driver\Driver.cs:line 19
at GEHealthcare.MM.Test.AutomationFramework.Client.Start(String platformVersion, String DeviceName, String udid, String appPath, String serverUrl) in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AutomationFramework\Client\Client.cs:line 19
at GEHealthcare.MM.Test.BusinessLogic.AppInitializer.Start(String platformVersion, String DeviceType, String udid, String appPath, String serverUrl) in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\BusinessLogic\AppInitializer\AppInitializer.cs:line 13
at GEHealthcare.MM.Test.BaseStepDefinition.BeforeAll() in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AudioManager.Test\StepDefinations\BaseStepDefinition.cs:line 28
at lambda_method(Closure , IContextManager )
at TechTalk.SpecFlow.Bindings.BindiAPPIUMnvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEAPPIUMne.FireEvents(HookType bindingEvent)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEAPPIUMne.OnScenarioStart(ScenarioInfo scenarioInfo)
at TechTalk.SpecFlow.TestRunner.OnScenarioStart(ScenarioInfo scenarioInfo)
at AudioManager.Test.Features.RunningFeature.ScenarioSetup(ScenarioInfo scenarioInfo) in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AudioManager.Test\Features\Hipaa.feature.cs:line 0
at AudioManager.Test.Features.RunningFeature.TC_58_VerifyTheFunctionalityOfContinueLogoutOptions(String filename, String action, String knownRunninglockTimeoutKeyValue, String runninglockTimeoutValueKey, String runninglockTimeoutValueValue, String knownrunningMaxLogonKeyValue, String runningMaxLogonValueKey, String runningMaxLogonValueValue, String noOfAttempts, String password, String[] exampleTags) in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AudioManager.Test\Features\Running.feature:line 63
--WebException
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--TearDown
at GEHealthcare.MM.Test.AutomationFramework.Client.Quit() in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AutomationFramework\Client\Client.cs:line 24
at GEHealthcare.MM.Test.BusinessLogic.AppInitializer.Quit() in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\BusinessLogic\AppInitializer\AppInitializer.cs:line 18
at GEHealthcare.MM.Test.BaseStepDefinition.AfterAll() in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AudioManager.Test\StepDefinations\BaseStepDefinition.cs:line 39
at lambda_method(Closure , IContextManager )
at TechTalk.SpecFlow.Bindings.BindiAPPIUMnvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEAPPIUMne.FireEvents(HookType bindingEvent)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEAPPIUMne.OnScenarioEnd()
at TechTalk.SpecFlow.TestRunner.OnScenarioEnd()
at AudioManager.Test.Features.RunningFeature.ScenarioTearDown() in c:\Build\APPIUM\RD\AudioM\2016\2\PROD\River_Wind\AudioManagerSystemTest\AudioManager.Test\Features\Hipaa.feature.cs:line 0
使用Specflow作为开发框架,使用Appium作为自动化工具(iOS设备)进行测试