How to run the Behat tests locally
We supply a headless chrome container which can be used to run the behat tests.
Please find it on the following repository: https://github.com/goalgorilla/drupal_social
-
Check that
${PROJECT_NAME}_chrome
and${PROJECT_NAME}_web
containers are running by performing the following command:docker ps
-
If the containers are not running execute the following command in the root of your projects:
docker-compose up --force-recreate -d --remove-orphans
-
If the containers are still not available, review the
docker-composer.yml
file in the project root. -
Run a Behat tests by executing the below command, the last argument is an optional Behat tag; if left empty all tests will be executed.
docker exec -it ${PROJECT_NAME}_web sh /var/www/scripts/social/behatstability.sh DS-233
-
Failed Behat tests will generate a screenshot and html in the following directory:
/var/www/html/profiles/contrib/social/tests/behat/logs
Replace ${PROJECT_NAME}
with the environment variable value set in the .env
file in the project root.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion