This repository contains basic configuration files to setup and run Behat in a fresh Drupal 9 site
-
Copy
.lando.yml
file from here and paste in project root,- Update value of
config.webroot
key toweb
ordocroot
according to your application in.lando.yml
- Update value of keys
creds.user
andcreds.password
according to your DB creds in.lando.yml
- Update value of
-
Run
lando rebuild -y
-
Run
lando composer require acquia/blt-behat:dev-master -W
-
Run
lando composer require emuse/behat-html-formatter
-
Copy
blt.yml
file from here and paste insideblt
folder,- Update value of
docroot
key toweb
ordocroot
according to your application inblt.yml
- Update value of
-
Run
lando blt recipes:behat:init
-
Copy
behat.yml
file from here andexample.local.yml
file from here and paste insidetests/behat
folder -
Run
lando blt tests:behat:init
-
Execute Behat tests by running
lando blt tests:behat
-
You can override Behat configuration while executing using
-D
option. E.g.lando blt tests:behat -D behat.tags=@example
-
Look for existing Behat steps by running
lando blt tests:behat:list:definitions
-
You can also execute by running
/app/vendor/bin/behat --config /app/tests/behat/local.yml --profile local
from inside Lando server