Behat/Visual Diff:
-
Install Behat, Visual Diff and Selenium Server:
- sh bootstrap.sh
-
Modify your local Behat configuration file. Inside 'Behat/behat.local.yml', update:
- the base_url to your local site url
- the 'drupal_root' value to the path to your local drupal installation.
-
Modify your local VisualDiff configuration file. Inside 'VisualDiff/behat.local.yml', update:
- the base_url to your local site url
NodeJS and PhantomJS:
- Install NodeJS to /usr/local/bin:
- sudo npm install -g nodejs
- Install PhantomJS /usr/local/bin:
- sudo npm install -g phantomjs
Install chromedriver (optional step):
- Download chromedriver from http://chromedriver.storage.googleapis.com/index.html?path=2.17/
- Save it to /usr/local/bin
Install safaridriver (optional step):
- Download SafariDriver.safariextz from http://selenium-release.storage.googleapis.com/index.html?path=2.45/
Behat:
- Open a terminal window.
- Navigate to /cw_test/Behat
- To execute the tests, select one of the following options based on the format 'sh run-behat.sh ':
- sh run-behat.sh smoke chrome
- sh run-behat.sh regression chrome
- sh run-behat.sh smoke firefox
- sh run-behat.sh regression firefox
- sh run-behat.sh smoke phantomjs
- sh run-behat.sh regression phantomjs (recommended)
Visual Diff:
- Open a terminal window.
- Navigate to /cw_test/VisualDiff
- Type 'sh run-visualdiff.sh'
The results of all tests will be stored in /cw_test/Results.
- Fork the repo to have a D7 and D8 versions.