Skip to content

Commit

Permalink
Add smoke test for PhantomJS node
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-cz committed Feb 21, 2017
1 parent f8ba86f commit b6592ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Test/smoke-phantomjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./smoke-test')('phantomjs');
16 changes: 16 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ echo 'Starting Selenium Chrome node...'
NODE_CHROME=$(docker run -d --link $HUB_NAME:hub selenium/node-chrome$DEBUG:3.0.1-germanium)
echo 'Starting Selenium Firefox node...'
NODE_FIREFOX=$(docker run -d --link $HUB_NAME:hub selenium/node-firefox$DEBUG:3.0.1-germanium)
if [ -z $DEBUG ]; then
echo 'Starting Selenium PhantomJS node...'
NODE_PHANTOMJS=$(docker run -d --link $HUB_NAME:hub selenium/node-phantomjs:3.0.1-germanium)
fi
docker logs -f $NODE_CHROME &
docker logs -f $NODE_FIREFOX &
if [ -z $DEBUG ]; then
docker logs -f $NODE_PHANTOMJS &
fi
echo 'Waiting for nodes to register and come online...'
sleep 2

Expand All @@ -60,6 +67,9 @@ function test_node {

test_node chrome $DEBUG
test_node firefox $DEBUG
if [ -z $DEBUG ]; then
test_node phantomjs $DEBUG
fi

if [ ! "$CIRCLECI" == "true" ]; then
echo Tearing down Selenium Chrome Node container
Expand All @@ -70,6 +80,12 @@ if [ ! "$CIRCLECI" == "true" ]; then
docker stop $NODE_FIREFOX
docker rm $NODE_FIREFOX

if [ -z $DEBUG ]; then
echo Tearing down Selenium PhantomJS Node container
docker stop $NODE_PHANTOMJS
docker rm $NODE_PHANTOMJS
fi

echo Tearing down Selenium Hub container
docker stop $HUB
docker rm $HUB
Expand Down

0 comments on commit b6592ed

Please sign in to comment.