Skip to content

Instantly share code, notes, and snippets.

@nedSaf
Last active August 29, 2015 14:09
Show Gist options
  • Save nedSaf/ca3455103dd631ce064d to your computer and use it in GitHub Desktop.
Save nedSaf/ca3455103dd631ce064d to your computer and use it in GitHub Desktop.
Run behat tests with phantomJs
1. Install phantomJs on local machine.
sudo apt-get update
sudo apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev libxft-dev
sudo apt-get install phantomjs
2. Activate phantomJs from the terminal in a new tab (This should be kept running with the behat testing).
phantomjs --webdriver=8643
------------------------
3. We need to activate Behat.
cd to the behat directory.
4. Copy the behat.yml example file
cp behat.local.yml.example behat.local.yml
5. If you never activated behat before, you need download composer with the following commands:
curl http://getcomposer.org/installer | php
sudo apt-get install curl
6. Install the composer.phar
php composer.phar install
7. Run behat with phantomJS with this command:
bin/behat -p phantomjs
If you get this error:
Drupal\Exception\BootstrapException]
Unable to determine Drupal core version. Supported versions are 6, 7, and 8.
Check the path of the drupal installation in your new behat.yml.local file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment