- Install the framework:
- composer require bm/behat_framework
-
Install Behat:
- cd vendor/bm/behat_framework
- ./bootstrap.sh
-
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.
This is only required if you want to run tests on Chrome. (By default, Firefox works out-of-the-box.)
- Download chromedriver from http://chromedriver.storage.googleapis.com/index.html?path=2.17/
- Save it to /usr/local/bin
- Open a terminal window.
- Navigate to /cw_test/Behat
- To execute the tests, select one of the following options based on the format './run-behat.sh [tag] [profile]':
- ./run-behat.sh regression firefox or
- ./run-behat.sh regression chrome
The results of all tests will be stored in
- /cw_test/Results/Twig_***.html