Testng: Getting Unreachable browser exception after a while when I am running the TestNG tests. OS : MAC

Created on 9 May 2016  Â·  59Comments  Â·  Source: cbeust/testng

I am running my tests in MAC as well as in Windows. In windows, the code works like a charm. In MAC OSX, I run the same code and it will be working fine BUT after a while I get unreachable browser exception.
I am running my test through maven surefire plugin.
maven version : 3.3.9
surefire plugin : 2.19.1
testng version : 6.9.10
java.version: 1.8.0_77

Here is my stacktrace

UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={userDataDir=/var/folders/cd/vbgjmfqj67s2_7lxl03xm5wc0000gn/T/.org.chromium.Chromium.uH5fCE}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.94, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 900637934c566c1fb4ddc890c4eaaa10
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={userDataDir=/var/folders/cd/vbgjmfqj67s2_7lxl03xm5wc0000gn/T/.org.chromium.Chromium.uH5fCE}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.94, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 900637934c566c1fb4ddc890c4eaaa10
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
    at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
    at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69)
    at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
    at com.sun.proxy.$Proxy16.isDisplayed(Unknown Source)
    at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:302)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$100(ExpectedConditions.java:41)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:288)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:285)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
    at org.etna.utils.Waiting.explicitWaitVisibilityOfElement(Waiting.java:36)
    at org.etna.customer.pageobjects.HomePageObjects.waitForProfileDropdownLink(HomePageObjects.java:508)
    at org.etna.modules.LoginModuleTest.TC_Login_009_010_RememberPassword_UserNameAndPasswordRefill(LoginModuleTest.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)
    at org.etna.maincontroller.MainController.run(MainController.java:208)
    at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    at org.testng.TestRunner.privateRun(TestRunner.java:782)
    at org.testng.TestRunner.run(TestRunner.java:632)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
    at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: org.openqa.selenium.WebDriverException: java.net.SocketException: Bad file descriptor
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
    ... 45 more
Caused by: java.net.SocketException: Bad file descriptor
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at org.apache.http.impl.conn.LoggingOutputStream.write(LoggingOutputStream.java:77)
    at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:126)
    at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:138)
    at org.apache.http.impl.io.SessionOutputBufferImpl.flush(SessionOutputBufferImpl.java:146)
    at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:101)
    at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:117)
    at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:158)
    at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:162)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:237)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)

PFB my TestNG.xml file

<suite name="Etna Automation Suite">
    <listeners>
            <listener class-name="org.etna.maincontroller.MainController"/>
            <listener class-name="org.etna.utils.ReportGenerator"/>
    </listeners>
  <test name="End to End Testing">
    <groups>
    <run>
    <include name="regression"/>
    </run>
    </groups>

    <classes>
      <class name="org.etna.modules.ShopByBrandsModuleTest"/>
      <class name="org.etna.modules.GeneralSearchModuleTest"/>
      <class name="org.etna.modules.PDPModuleTest"/>
      <class name="org.etna.modules.ShopByManufacturersModuleTest"/>
      <class name="org.etna.modules.LoginModuleTest"/>
      <class name="org.etna.modules.MyCartModuleTest"/>
      <class name="org.etna.modules.CategoryModuleTest"/>
      <class name="org.etna.modules.HomePageModuleTest"/>
      <class name="org.etna.modules.APAModuleTest"/>
    </classes>
  </test>
</suite> 

*_Each class contains atleast 20 test cases each. *_

Here is my pom.xml too.

   <modelVersion>4.0.0</modelVersion>
    <groupId>ETNA</groupId>
    <artifactId>inhouse.NewStandardEcommerceTemplate</artifactId>
    <version>1.0-SNAPSHOT</version>
    <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.version>1.7</compiler.version>
        <allure.version>1.5.0.RC2</allure.version>
        <aspectj.version>1.8.9</aspectj.version>
        <version.selenium>2.53.0</version.selenium>
         <version.slf4j>1.7.7</version.slf4j>
    </properties>
    <name>ETNA</name>
    <description>New standard ecommerce template</description>
    <dependencies>
     <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.7.0</version>
  </dependency>
    <dependency>
    <groupId>com.pojosontheweb</groupId>
    <artifactId>monte-repack</artifactId>
    <version>1.0</version>
    </dependency>
    <dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.9.10</version>
  <scope>test</scope>
</dependency>
    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>2.9.0</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>${version.selenium}</version>
    </dependency>
    <dependency>
    <groupId>org.zeroturnaround</groupId>
    <artifactId>zt-zip</artifactId>
    <version>1.7</version>
    </dependency>
    <dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.7</version>
</dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${version.selenium}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>${version.selenium}</version>
</dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-testng-adaptor</artifactId>
            <version>${allure.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
        </dependency>
     <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
         <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectj.version}</version>
          </dependency>
           <dependency>
                   <groupId>org.aspectj</groupId>
                   <artifactId>aspectjrt</artifactId>
                    <version>${aspectj.version}</version>
                    </dependency>     
    </dependencies>
    <build>
<pluginManagement>
     <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${compiler.version}</source>
                    <target>${compiler.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                 <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                 </suiteXmlFiles>
                    <argLine>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.10.v20150310</version>
                <configuration>
                    <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
                    <stopKey>stop</stopKey>
                    <stopPort>1234</stopPort>
                </configuration>
            </plugin>
        </plugins>
</pluginManagement>
    </build>
    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.5</version>
                  <configuration>
                    <reportVersion>${allure.version}</reportVersion>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>

Again, reminding you that the tests work perfectly fine windows machine. OSX version : 10.11.4 . I hope I can get a fix for this.

Also, Right clicking the testng.xml and clicking on run as testng suite IS WORKING FINE.

3rd-party-issue

Most helpful comment

He already did file a bug report with selenium https://github.com/SeleniumHQ/selenium/issues/2049

All 59 comments

This has nothing to do with TestNG, file an issue with chrome webdriver: https://bugs.chromium.org/p/chromedriver/issues/list

I don't know if the problem comes from Chrome, but you should ask it on selenium project before here ;)

Feel free to reopen the issue when you will have more detail on a testng issue.

He already did file a bug report with selenium https://github.com/SeleniumHQ/selenium/issues/2049

@Mobrockers Thank you. :) . I really don't think this is a chromedriver issue because it is not working in firefoxdriver and safari too. The execution simply stops.
@juherr I wish I had more info :). I have raised it to https://issues.apache.org/jira/browse/SUREFIRE-1245 . Can you please add if you have any inputs on what the developer has replied in the comments section ?

Ok thank, I will try to follow the discussion you have with @Tibor17

The best thing you can do is find a way to reproduce the issue in a project you can share. It will be easier to find where is the problem and how to fiw it.

Perhaps your issue is related to
https://somethingididnotknow.wordpress.com/2014/07/23/forkedbooter-steals-window-focus-on-mac-os-while-maven-is-running/

On Tue, May 10, 2016, 16:52 Hemanth Sridhar [email protected]
wrote:

@Mobrockers https://github.com/Mobrockers Thank you. :) . I really
don't think this is a chromedriver issue because it is not working in
firefoxdriver and safari too. The execution simply stops.
@juherr https://github.com/juherr I wish I had more info :). I have
raised it to https://issues.apache.org/jira/browse/SUREFIRE-1245 . Can
you please add if you have any inputs on what the developer has replied in
the comments section ?

—
You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
https://github.com/cbeust/testng/issues/1040#issuecomment-218182388

@hemanthsridhar If the issue is maven related, could you try to run your tests in Windows from your IDE?

@juherr If you see the first thing that I have mentioned in this issue, you will get the answer. It is working absolutely fine using windows.

@Mobrockers seems like a long shot. Will try it though.

Yes, sorry. I wanted to say osx.

The goal is to determine between all layers which one is failing.

If the tests are working well from the ide without maven, we will be able to exclude it from the list of suspects.

@juherr No issues :). Anyways, you want me right click and run as testng suite from the IDE?

@juherr I checked it from the IDE. receiving unreachable browser exception again.

@juherr I ran from testng.xml but it worked fine on that particular day. I really don't know what is going on here now. :(

screen shot 2016-05-11 at 1 24 16 am

@juherr @Tibor17 for proof.

Are you not opening too many concurrent browser sessions, grinding your
system to a stop, causing selenium to lose connection to the browser?

On Tue, May 10, 2016, 21:55 Hemanth Sridhar [email protected]
wrote:

@juherr https://github.com/juherr for proof.

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/cbeust/testng/issues/1040#issuecomment-218271901

I am not doing anything of that sort. It is just a simple execution of test cases.(Like I told you, working like a charm in Windows).@Mobrockers

@Mobrockers Please see my testng.xml that I have given in the issue.

I was assuming that when you say running on osx you also mean a different
machine. A different machine could mean different hardware limitations
that's why I'm asking. Starting a browser instance is not cheap, but should
not matter unless running tests concurrent. Which is when it adds up. It's
kind of hard to read a pomfile in a github issue on mobile, was easier to
just ask you.

On Tue, May 10, 2016, 22:04 Hemanth Sridhar [email protected]
wrote:

I am not doing anything of that sort. It is just a simple execution of
test cases.(Like I told you, working like a charm in Windows).@Mobrockers
https://github.com/Mobrockers

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/cbeust/testng/issues/1040#issuecomment-218274287

@Mobrockers Alright. Did not know that. Ask me anything, I will reply again. Just want this issue to get fixed. If you guys want I can drop a screenshot that it is working fine in windows.
And the answer is no. I am not running any concurrent tests.

windowstestngscreenshot

check the os.name in every screenshot.

Ok, so if I understand well, now you reproduce the issue with eclipse on Windows too?

The windows screenshot is showing a different error message it seems like.

True, but it is not the same test. Difficult to conclude something.

And on the OSX one, I read "Bad File descriptor".
Definitely, I think the solution will come from the selenium community.

@juherr The error shown in his windows screenshot looks like a selenium TimeoutException on finding an element on the page, as in a normal exception that one would expect while running a selenium test.
Perhaps the screenshot is to show us that it is working fine on windows, not that he can reproduce the same issue on windows.

@Mobrockers You are absolutely right. I wanted to show that the suite executed completely in windows and not in MAC.
@juherr Hope you got whatever I was trying to intend. And yes, I replicated the same again in windows as well as MAC using the testng.xml inside the IDE(eclipse).

@juherr If you want I can share the screenshot for the same test case. It is the same suite. In Windows it executed completely. In MAC it stopped. Kindly reply back if you want the screenshot.

@hemanthsridhar It is still a bit confure for me.

No need to have screenshots, but could you just run only 1 test from your suite which is supposed to run well in some cases and fails in some other cases?

I see 4 tests:

  • windows + maven
  • windows + eclipse
  • osx + maven
  • osx + eclipse

I had a deeper look at your stracktrace and the root issue is:

Caused by: java.net.SocketException: Bad file descriptor
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)

As it is native code, it is not a huge surprise to see some differences between different os.

I found a similar stacktrace somewhere else: https://bugzilla.zimbra.com/show_bug.cgi?id=42870
I suppose osx is more strict than windows... (again without surprise)

One thing I would like to see is this same error with a browser that is not
chrome. Because I still think this is an issue with chromedriver
specifically.

On Wed, May 11, 2016, 17:36 Julien Herr [email protected] wrote:

@hemanthsridhar https://github.com/hemanthsridhar It is still a bit
confure for me.

No need to have screenshots, but could you just run only 1 test from your
suite which is supposed to run well in some cases and fails in some other
cases?

I see 4 tests:

  • windows + maven
  • windows + eclipse
  • osx + maven
  • osx + eclipse

I had a deeper look at your stracktrace and the root issue is:

Caused by: java.net.SocketException: Bad file descriptor
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)

As it is native code, it is not a huge surprise to see some differences
between different os.

I found a similar stacktrace somewhere else:
https://bugzilla.zimbra.com/show_bug.cgi?id=42870
I suppose osx is more strict than windows... (without surprise)

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/cbeust/testng/issues/1040#issuecomment-218497867

@juherr
windows + maven - Working perfectly.
windows + eclipse - Working perfectly.
osx + maven - Getting error.
osx + eclipse - Getting error.
Will send the screenshot for the one which failed in MAC and which passed in Windows.

@Mobrockers Will try to generate in a different browser by tonight(IST) and will send.

@juherr then the issue is related to?

For me, it is an osx limitation with its default resources configuration.

But as @Mobrockers proposed, you should try with another selenium driver.

Will try with firefox and get back to you guys.

@Mobrockers It is so weird. I ran my test through Firefoxdriver today and it is working perfectly. The other day I did the same and it didn't work. If I face the same I will get back to you guys.
@Mobrockers and @juherr Can you guys please do me a favour? Can you please ask the selenium developer to open the bug again? I had asked him to open it but he didn't. He felt that it was a tutorial.

Thank you so much for your help guys. Please close this issue.

PS : Will get back to the same bug if I face the same using Firefox.(which I did).

screen shot 2016-05-19 at 1 06 59 pm
screen shot 2016-05-19 at 1 07 24 pm

Occurring for firefox now. Please open this issue if required and get this resolved if it is from your end.

As I think it is more a Selenium issue than a TestNG one, I propose you try to find help on its mailing list: https://groups.google.com/forum/#!forum/selenium-users

Since no one else seems to be reporting this particular bug, and you manage to reproduce it consistently across browsers but not systems, I would rather say it's got something to do with your particular hardware + software setup. Have you tried running your testsuite on someone else's mac? In any case like @juherr said you should probably ask in the selenium users group.

Also I just saw in the selenium issue you created that you do not get this problem running your tests in failsafe. Since failsafe is designed to run integration-tests (which selenium tests are) the quick fix for you would be to simply use failsafe. There's really no reason at all NOT to use failsafe for selenium tests.

@Mobrockers I am using allure reports which is dependent on surefire. Anyways, you are right, I will try to set up in someone else's MAC and see whether it works. Will get back to you guys.

Can I share you guys my repo so that you guys can clone it and check please? This is really important. It would mean alot if you guys helped me with this. I really don't see any issue in configuration. Can you guys please check?

I do not have a mac, sorry. Perhaps @remcowesterhoud can help you.

okay. thank you.

@juherr can you help me with this please?

@juherr https://groups.google.com/forum/#!searchin/selenium-users/unreachable/selenium-users/Hp7MenNlIDU/UBGiTHZlBAAJ

I had done this long back. No one replied though.

@Mobrockers does any problem occur if we delete test-output folder? No right? Because I started getting this issue(firefox) once I deleted that folder and pushed the code to bitbucket.

https://bitbucket.org/hemanthsridhar/etna if you can help. Master branch contains the latest code.

I don't see how that could have an effect on selenium, no. Sorry

On Thu, May 19, 2016, 20:46 Hemanth Sridhar [email protected]
wrote:

@Mobrockers https://github.com/Mobrockers does any problem occur if we
delete test-output folder? No right? Because I started getting this
issue(firefox) once I deleted that folder and pushed the code to bitbucket.

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/cbeust/testng/issues/1040#issuecomment-220415774

Nothing in your configuration or source code stands out to me.

@juherr can you help me with this please?

No, I have no mac :/

@juherr the bug I raised to the chromedriver guy has a mac. He has my tests, he got the same issue. He's not bothered I guess because it is occurring for Firefox as well. Don't know what is going on.

@hemanthsridhar I just ran your tests and am getting the same error. Were you able to find some sort of pattern in when the exception is thrown. I've been trying and it seems completely random when I run multiple tests. I've changed the order and modules that it runs with no result. However, when I run individual modules they all seem to work.

@remcowesterhoud
You're spot on. No pattern. Occurs randomly. Thank you so much for doing it though.

Any update on this?

@hemanthsridhar did you ever find a solution for this .Im having the same issue on my mac.It works fine on windows.

Issue remains same , is suggestion handle the issue ?

@SelvamaniD - This issue has got nothing to do with TestNG. I think you should be posting on the selenium-users forums.

@SelvamaniD @krmahadevan is right. This has nothing to do with TestNG.
The issue was with jdk for Mac.
Problem : I had used alot of statics
Solution : Converted into Objects. Worked like a charm.

Note : You have no idea to what extent I reached to get to the bottom of this issue. Stalking Selenium Developers. Attending a Conference, just to meet them and show them. But unfortunately, the answer was always pointing fingers to someone else.

Hope this helps.

Was this page helpful?
0 / 5 - 0 ratings