Last active
May 6, 2016 14:39
-
-
Save alexandr-parkhomenko/c918ad4ae2bd63700591ab849e8ab49e to your computer and use it in GitHub Desktop.
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 characters
#!/usr/bin/env bash | |
# This script install PhantomJS in your Debian/Ubuntu System | |
# | |
# This script must be run as root: | |
# sudo sh install_phantomjs.sh | |
# | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
PHANTOM_VERSION="phantomjs-2.1.1" | |
SELENIUM_VERSION="2.53" | |
ARCH=$(uname -m) | |
if ! [ $ARCH = "x86_64" ]; then | |
$ARCH="i686" | |
fi | |
PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH" | |
sudo apt-get update | |
sudo apt-get install build-essential g++ flex bison gperf ruby perl \ | |
libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \ | |
libpng-dev libjpeg-dev python libx11-dev libxext-dev -y | |
cd ~ | |
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 | |
sudo tar xvjf $PHANTOM_JS.tar.bz2 | |
sudo mv $PHANTOM_JS /usr/local/share | |
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin | |
sudo apt-get install openjdk-7-jre -y | |
wget http://selenium-release.storage.googleapis.com/$SELENIUM_VERSION/selenium-server-standalone-$SELENIUM_VERSION.0.jar | |
sudo mv selenium-server-standalone-$SELENIUM_VERSION.0.jar /usr/local/share | |
sudo ln -s /usr/local/share/selenium-server-standalone-$SELENIUM_VERSION.0.jar /usr/bin/selenium-server | |
# phantomjs --webdriver=4444 | |
# selenium-server -p 4444 | |
# Prepare steps | |
# app/console doctrine:fixture:load --no-debug --append --no-interaction --env=prod --fixtures vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Fixtures | |
# composer global require "phpunit/phpunit-selenium:dev-master" --prefer-dist --update-no-dev | |
# phpunit --testsuite "selenium" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment