Skip to content

Instantly share code, notes, and snippets.

@jollychang
Created July 1, 2011 07:18
Show Gist options
  • Save jollychang/1058032 to your computer and use it in GitHub Desktop.
Save jollychang/1058032 to your computer and use it in GitHub Desktop.
Selenium Grid config script
>>>hub machine (ip=192.168.1.208)<<<
# /etc/init.d/selenium-grid-hub
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
PIDFILE=/var/run/selenium-hub.pid
DISPLAY=:90
#JAVA=/usr/lib/jvm/icedtea6-bin/bin/java
JAVA=/usr/lib/jvm/sun-jdk-1.6/bin/java
JAR=/usr/lib64/python2.6/site-packages/SeleniumLibrary/lib/selenium-server.jar
PORT=6666
PROFILE=/usr/lib64/python2.6/site-packages/SeleniumLibrary/firefoxprofile
LOG=/var/log/selenium-hub.log
depend() {
need net xvfb
use logger
}
start() {
ebegin "Starting selenium-daemon"
start-stop-daemon --start --quiet --background \
--make-pidfile --pidfile ${PIDFILE} \
--exec ${JAVA} -- -jar ${JAR} -role hub \
-port ${PORT} \
eend $?
}
stop() {
ebegin "Stopping selenium-daemon"
start-stop-daemon --stop --quiet \
--pidfile ${PIDFILE}
eend $?
}
restart() {
stop
sleep 3
start
}
or type simple shell
/usr/lib/jvm/sun-jdk-1.6/bin/java -jar /usr/lib64/python2.6/site-packages/SeleniumLibrary/lib/selenium-server.jar -role hub -port 6666
>>>node machine <<<
java -jar "selenium-server.jar" -role rc -hub http://192.168.1.208:6666/grid/register -port 6667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment