5

I am using Selenium WebDriver to run a suite of tests in the grid mode. When I run all the test and if it is ALL PASS, I have no issues with the test suite.

But if a test fail say in a suite of 200 tests, if test 121 failed, all the remaining test are not executed and I am getting the response as System.InvalidOperationException: Session [] was terminated due to CLIENT_GONE for all the tests.

Any pointers on this would be very helpful. Thanks

Below is the stacktrace

Result2 Name:   AboutThem (Data Row 2)
Result2 Outcome:    Failed
Result2 Duration:   0:11:32.4810094
Result2 StackTrace: 
Server stack trace: 
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath)
at OpenQA.Selenium.By.<>c__DisplayClasse.<XPath>b__c(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
at WebElementFactory.GetWebElement(IWebDriver driver, String identifier) in C:\WebElementFactory.cs:line 36
at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target)
at system.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]: 
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Driver.AboutThem()
Result2 Message:    
Test method Driver.AboutThem threw exception: 
System.InvalidOperationException: Session [] was terminated due to CLIENT_GONE
Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
  • There are a couple of things that you are telling here. 1. If one of your tests fail, then the remaining are not getting executed - For this you would need to show what does your code look like so that someone can help you out. 2. For the issue with CLIENT_GONE have you taken a look here[1] and see if that helps ? [1]https://github.com/SeleniumHQ/selenium/wiki/Grid2#hub-diagnostic-messages – Krishnan Mahadevan Mar 05 '16 at 17:41

0 Answers0