How to execute Selenium 2 tests in Jenkins How to execute Selenium 2 tests in Jenkins jenkins jenkins

How to execute Selenium 2 tests in Jenkins


I think i was making several mistakes. To resolve the Class Not Found Exception I added the following to ant's build.xml - (remember I am new Ant)

<target name="compile" depends="init" description="compile the source " >           <javac srcdir="src/" destdir="bin" classpathref="SeleniumCC.classpath"/></target>       

This got my java classes compiling.

Then I had to update the selenium standalone server to the latest version (selenium-server-standalone-2.xx.x.jar) This is located in:

jenkins_home_directory\plugins\selenium\WEB-INF\lib

Last I was trying to use the wrong configuration in the selenium plug-in (I was trying to use a Custom RC node configuration, what I needed was a Custom web driver node configuration.)

enter image description here

ALSO NOTE : When running Selenium Server on Red Hat I had to setup and install XVFB with Jenkins Xvfb plugin.

I hope this can be of help to others in the future! Good luck!


Well if your intention is to simply run the selenium script without Selenium Grid. Then you do not need any plugin. You would only need remote webdriver.

To launch Selenium 2 from Jenkins the best way would be is to wrap the test process in the pom.xml (if you are using Maven) and then simply create a new job in Maven using "Build a maven2/3 project" in Jenkins.