You are here

run-behat.sh in Support Ticketing System 8

#!/bin/bash
# @file
# Simple script to load composer and run behat tests.

set -e

DIR=$(dirname $0)
cd $DIR
cd ./behat
test -f "./vendor/bin/behat" || composer install --no-interaction --prefer-source

# Checking for Phantom JS or selenium (Linux only)
if ! { netstat -l -n | grep -q :4444; }
then
	echo "Error: PhantomJS or selenium could not be found." 1>&2
	echo "" 1>&2
	echo "Start phantomjs with:" 1>&2
	echo "  phantomjs --webdriver=4444 &" 1>&2
	exit 1
fi

./vendor/bin/behat "$@"

File

tests/run-behat.sh
View source
  1. #!/bin/bash
  2. # @file
  3. # Simple script to load composer and run behat tests.
  4. set -e
  5. DIR=$(dirname $0)
  6. cd $DIR
  7. cd ./behat
  8. test -f "./vendor/bin/behat" || composer install --no-interaction --prefer-source
  9. # Checking for Phantom JS or selenium (Linux only)
  10. if ! { netstat -l -n | grep -q :4444; }
  11. then
  12. echo "Error: PhantomJS or selenium could not be found." 1>&2
  13. echo "" 1>&2
  14. echo "Start phantomjs with:" 1>&2
  15. echo " phantomjs --webdriver=4444 &" 1>&2
  16. exit 1
  17. fi
  18. ./vendor/bin/behat "$@"