Last active
February 16, 2018 17:32
-
-
Save jakzal/8583518 to your computer and use it in GitHub Desktop.
Revisions
-
jakzal revised this gist
Jan 23, 2014 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ command=${1:-"help"} SELENIUM_VERSION="2.39.0" NODE_OPTIONS="-browser browserName=phantomjs" download() { [ -f selenium-server-standalone.jar ] || wget http://selenium.googlecode.com/files/selenium-server-standalone-${SELENIUM_VERSION}.jar -Oselenium-server-standalone.jar @@ -14,11 +15,11 @@ start_hub() { } start_nodes() { nodes=$( [ $(which nproc) ] && nproc || sysctl -n hw.ncpu) for i in $(seq 1 $nodes); do echo "Starting node "$i port=$(expr 5555 + $i) java -jar selenium-server-standalone.jar -role node -port $port $NODE_OPTIONS > /dev/null 2>&1 & sleep 1 done } @@ -30,7 +31,7 @@ start() { } stop() { ps ax -o'pid command' | grep selenium-server | grep -v grep | awk '{print $1}' | tr "\n" ' ' | xargs kill -9 &> /dev/null } help() { -
jakzal revised this gist
Jan 23, 2014 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh command=${1:-"help"} SELENIUM_VERSION="2.39.0" @@ -33,4 +33,10 @@ stop() { ps ax o'pid command' | grep selenium-server | grep -v grep | awk '{print $1}' | tr "\n" ' ' | xargs kill -9 &> /dev/null } help() { echo "Available actions: " compgen -A function | tr "\\n" " " echo } $command -
jakzal revised this gist
Jan 23, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,15 +10,15 @@ download() { start_hub() { echo "Starting the hub" java -jar selenium-server-standalone.jar -role hub > /dev/null 2>&1 & } start_nodes() { nodes=$(grep "^processor" /proc/cpuinfo | sort -u | wc -l) for i in $(seq 1 $nodes); do port=$(expr 5557 + $i) echo "Starting node "$i java -jar selenium-server-standalone.jar -role node -port $port -browser browserName=phantomjs > /dev/null 2>&1 & sleep 1 done } -
jakzal created this gist
Jan 23, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/sh command=$1||"start" SELENIUM_VERSION="2.39.0" download() { [ -f selenium-server-standalone.jar ] || wget http://selenium.googlecode.com/files/selenium-server-standalone-${SELENIUM_VERSION}.jar -Oselenium-server-standalone.jar } start_hub() { echo "Starting the hub" java -jar selenium-server-standalone.jar -role hub &> /dev/null & } start_nodes() { nodes=$(grep "^processor" /proc/cpuinfo | sort -u | wc -l) for i in $(seq 1 $nodes); do echo "Starting node "$i port=$(expr 5557 + $i) java -jar selenium-server-standalone.jar -role node -port $port -browser browserName=phantomjs &> /dev/null & sleep 1 done } start() { download start_hub start_nodes } stop() { ps ax o'pid command' | grep selenium-server | grep -v grep | awk '{print $1}' | tr "\n" ' ' | xargs kill -9 &> /dev/null } $command