1

I have around 90 odd scenarios in suite. Whenever I execute the test on some continuous integration(CI) build below error pops up for all the test cases. However when I restart my mac machine and launch Appium on CI environment, then everything works fine.

I am not able to figure why this error pops for all scenarios if I am not changing any configuration. There is not hardware/connection issue. After every successful run..then I need to ask some one who is present physically to restart the test environment and then I am able to execute it successfully.

Plz help to analyze the issue..Due to this whole idea of getting test executed in CI enviroment is getting defeated.

   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

Using Specflow as development framework for test with Appium as automation tool(iOS device)

Suraj Gupta
  • 390
  • 1
  • 9
  • 25
  • Is this issue due to some firewall antivirus installed on CI machine which is blocking Selenium WebDriver which is trying to communicate with the application using JSON over HTTP?? – Suraj Gupta Apr 06 '16 at 20:34
  • Also please help me understand what elemet is giving this error.. `1. My machine which is having automation suite trying to connect to mac machine on which iOS device is connected.. 2. Appium while trying to find the remote web driver through which it will access the device to execute..` As per my understanding it is the later scenario which is throwing this error.. – Suraj Gupta Apr 06 '16 at 20:36
  • Hi Suraj, you should be able to [edit your question](http://stackoverflow.com/posts/36461750/edit) (it's under the tags) so you can add your questions there instead of in the comments. I'm not familiar with your platform but it looks like whatever web-browser ('remote WebDriver') Selenium tries to use to fetch that URL isn't responding. Perhaps the browser needs a graphics display which isn't present in the CI. If so, take a look at [this question about a headless Selenium driver](http://stackoverflow.com/questions/7568899/does-selenium-support-headless-browser-testing). – Kenney Apr 06 '16 at 20:41
  • @Kenney I am trying to automate a native app which is on iOS device..Trying to connect to device using appium with UDID and remote server address.. In my case remote server and mac machine are same hence putting mac's ipAddress as remote server – Suraj Gupta Apr 06 '16 at 20:51
  • could you share the setup code used as well to make things clear – Naman Apr 07 '16 at 03:42
  • & do you mean your CI machine and front-end machine are same to execute? – Naman Apr 07 '16 at 03:52

0 Answers0