This behat extension is intended to work together with Drupal Extension and uses Drupal multisite possibilities in order to run tests on separate test site installation.
It works much more like Drupal's BrowserTest
.
If you have a Drupal site and run a behat
command then :
- A new site will be created at
sites/simpletest/{timestamp}
with an SQLite database and with given in configuration profile name. - Behat tests will run on this new installation.
- At the end of testing,
sites/simpletest
directory will be cleaned up ifreuse_installation
configuration value isn't set to TRUE.
This extension is tested with Drupal 8.6
.
Previous versions are not supported.
Modify your behat.yml
, add next lines :
extensions:
Drupal\DrupalExtension:
...
...
undertext\idrupalextension\IsolatedDrupalExtension:
profile: "standard"
reuse_installation: TRUE
This extension provides 2 configurable parameters:
- profile : name of the profile to install
- reuse_installation: do not reinstall test site installation each time if set to TRUE