Cedric,
While running tests in parallel on many browser combination, in few tests - say some methods ran and while running next method if selenium grid throws 'Error communicating with browser" or "session timeout" or any kind of grid communication issues - test results for that particular test set is not getting generated in TestNG report.
We run tests from Hudson and in hudson console I could clearly see that few methods ran successfully under one test and one particular failed because of communication issue because of which other methods under that test set is skipped. But the same thing is not coming in TestNG.
Note: I can't conclude any configuration failures doesn't lead to result generation. We use Before method to signin to the application and after method to signout. So, when there is failure during signin or signout it skips remaing tests and it generate in the report. Similarly I expect that failure during teardown (while quitting the browser) also should generate the test result in report - Hope I am correct ?
Below is the error from Hudson Console:
org.openqa.selenium.WebDriverException: Session [1340636615158] was terminated due to CLIENT_STOPPED_SESSION
Command duration or timeout: 250 milliseconds
Build info: version: '2.23.0', revision: '17137', time: '2012-06-07 09:08:12'
System info:
os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:462)
at org.openqa.selenium.remote.ExecuteMethod.execute(ExecuteMethod.java:44)
at org.openqa.selenium.remote.AddTakesScreenshot$1.invoke(AddTakesScreenshot.java:36)
at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:264)
at org.openqa.selenium.remote.RemoteWebDriver$$EnhancerByCGLIB$$8af380d1.getScreenshotAs(<generated>)
at com.aol.webmail.TestListener.captureScreenShot(TestListener.java:55)
at com.aol.webmail.TestListener.onConfigurationFailure(TestListener.java:124)
at org.testng.internal.Invoker.runConfigurationListeners(Invoker.java:1770)
at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:323)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:226)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:613)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
at org.testng.TestRunner.privateRun(TestRunner.java:749)
at org.testng.TestRunner.run(TestRunner.java:600)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:34)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:351)
at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:147)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.openqa.grid.common.exception.GridException: Session [1340636615158] was terminated due to CLIENT_STOPPED_SESSION
at org.openqa.grid.internal.ActiveTestSessions.getExistingSession(ActiveTestSessions.java:104)
at org.openqa.grid.internal.Registry.getExistingSession(Registry.java:423)
at org.openqa.grid.web.servlet.handler.RequestHandler.getSession(RequestHandler.java:234)
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:116)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:84)
at org.openqa.grid.web.servlet.DriverServlet.doGet(DriverServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.seleniumhq.jetty7.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.seleniumhq.jetty7.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.seleniumhq.jetty7.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.seleniumhq.jetty7.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.seleniumhq.jetty7.server.Server.handle(Server.java:349)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
at org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
at org.seleniumhq.jetty7.http.HttpParser.parseNext(HttpParser.java:634)
at org.seleniumhq.jetty7.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:636)
===============================================
Read Smoke Test On Win7-FF9
Tests run: 11, Failures: 2, Skips: 0
Configuration Failures: 2, Skips: 0
===============================================