Hi Folks,
I'm in the process of integrating Selenium RC and Xvfb with Bamboo. I can succesfully run firefox on the command line using Xvfb's virtual display, launching www.example.com and capturing a screen shot. However, Selenium hangs when trying to create a new browser session.
If you can understand the problem based on the logs below, great. If not, I would appreciate suggestions for resources to check. Thanks so much!
Selenium log excerpt:
11:05:33.816 INFO [12] org.openqa.selenium.server.SeleniumDriverResourceHandler - Command request: getNewBrowserSession[*firefox /usr/lib/iceweasel/firefox-bin, https://revenuewire.cc/] on session null
11:05:33.816 INFO [12] org.openqa.selenium.server.BrowserSessionFactory - creating new remote session
11:05:33.817 DEBUG [12] org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory - Requested browser string '*firefox /usr/lib/iceweasel/firefox-bin' matches *firefox
11:05:33.817 INFO [12] org.openqa.selenium.server.BrowserSessionFactory - Allocated session 7280ce26d52c4875ba246a8ce8a47a9a for https://revenuewire.cc/, launching...
11:05:33.817 DEBUG [12] org.openqa.selenium.server.browserlaunchers.ResourceExtractor - Extracting /customProfileDirCUSTFFCHROME to /tmp/customProfileDir7280ce26d52c4875ba246a8ce8a47a9a
11:05:33.840 INFO [12] org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher - Preparing Firefox profile...
11:05:53.865 ERROR [12] org.openqa.selenium.server.BrowserSessionFactory - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Timed out waiting for profile to be created!
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:364)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:120)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:90)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:416)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:118)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:374)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:86)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:809)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:435)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:405)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:149)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
11:05:53.868 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - clearing queue set
11:05:53.868 INFO [12] org.openqa.selenium.server.SeleniumDriverResourceHandler - Got result: Failed to start new browser session: Error while launching browser on session null
11:05:53.868 DEBUG [12] org.openqa.jetty.http.HttpContext - Handled by org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
11:05:53.868 DEBUG [12] org.openqa.jetty.http.HttpConnection - RESPONSE:
HTTP/1.1 200 OK
Date: Mon, 28 Nov 2011 19:05:33 GMT
Server: Jetty/5.1.x (Linux/2.6.35.14-revenuewire amd64 java/1.6.0_26
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 66
Bamboo log excerpt:
| 28-Nov-2011 11:05:33 |
selenium: |
| 28-Nov-2011 11:05:33 |
[exec] PHPUnit 3.6.3 by Sebastian Bergmann. |
| 28-Nov-2011 11:05:33 |
[exec] |
| 28-Nov-2011 11:05:33 |
[exec] Configuration read from /mnt/data/atlassian/Bamboo/xml-data/build-dir/LEGPRO-CIANT-JOB1/test-suite.revenuewire.com/Bamboo/selenium_config.xml |
| 28-Nov-2011 11:05:33 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] E |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] Time: 20 seconds, Memory: 6.00Mb |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] There was 1 error: |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] 1) Example::testMyTestCase |
| 28-Nov-2011 11:05:53 |
[exec] PHPUnit_Framework_Exception: Result is neither "true" nor "false": 'OR Server Exception: sessionId led to start new browser session: Error while launching browser doesn't exist; perhaps this session was already stopped?' |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] /mnt/data/atlassian/Bamboo/xml-data/build-dir/LEGPRO-CIANT-JOB1/test-suite.revenuewire.com/selenium/PHPUnit/LoginFirefoxTest.php:24 |
| 28-Nov-2011 11:05:53 |
[exec] /mnt/data/atlassian/Bamboo/xml-data/build-dir/LEGPRO-CIANT-JOB1/test-suite.revenuewire.com/selenium/PHPUnit/LoginFirefoxTest.php:24 |
| 28-Nov-2011 11:05:53 |
[exec] /usr/bin/phpunit:44 |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] FAILURES! |
| 28-Nov-2011 11:05:53 |
[exec] Tests: 1, Assertions: 0, Errors: 1. |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] Writing code coverage data to XML file, this may take a moment. |
| 28-Nov-2011 11:05:53 |
[exec] |
| 28-Nov-2011 11:05:53 |
[exec] Generating code coverage report, this may take a moment. |
| 28-Nov-2011 11:05:53 |
[exec] Result: 2 |