1

I am trying to run a test suite using Jenkins and to start the Selenium Server. In the job configuration, as a build step I have included:

enter image description here

When the command is executed, Jenkins hangs at a certain point and does not continue.

+ java -jar /var/lib/selenium/selenium-server-standalone-2.44.0.jar
22:21:00.572 INFO - Launching a standalone server
22:21:00.631 INFO - Java: Oracle Corporation 24.65-b04
22:21:00.631 INFO - OS: Linux 3.13.0-36-generic amd64
22:21:00.669 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
22:21:00.840 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
22:21:00.941 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
22:21:00.942 INFO - Version Jetty/5.1.x
22:21:00.944 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
22:21:00.945 INFO - Started HttpContext[/selenium-server,/selenium-server]
22:21:00.945 INFO - Started HttpContext[/,/]
22:21:00.989 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@5b7da0d1
22:21:00.989 INFO - Started HttpContext[/wd,/wd]
22:21:00.997 INFO - Started SocketListener on 0.0.0.0:4444
22:21:00.997 INFO - Started org.openqa.jetty.jetty.Server@2ce6a73d

If I start the Selenium Server in a console, the Jenkins job completes successfully.

Any ideas?

Valentin Despa
  • 143
  • 1
  • 7

1 Answers1

1

Jenkins executes commands in sequence. It goes to the next command only after the current one gets finished.

Now, you launch Selenium and it runs in foreground. Unless you kill it, the command you execute is still running. That's why Jenkins doesn't go on with other commands in the build.

You better use Upstart or something else to launch Selenium so that it's always running.