Behat image based on Alpine Linux with PHP7.
10K+
This image is based on Alpine Linux with PHP7 and could be used to test Docker and non-Docker websites.
This image includes (composer update is possible):
Behat cucumber json formatter
Also, it uses official selenium/standalone-chrome image.
git clone https://github.com/Bergil32/behat.git
Put your custom contexts into "features/bootstrap/" folder if needed.
Configure behat.yml for your custom contexts.
Put your tests into "features/" folder.
Configure volumes in docker-compose.behat.yml.
E.x.
base_url: 'https://en.wikipedia.org'
sh test.sh
docker-compose -f docker-compose.behat.yml down
base_url: '{https/http}://{web server service name}:{internal port}'
E.x.,
base_url: 'http://nginx:80'
E.x.,
$settings['trusted_host_patterns'][] = '^nginx$';
It is needed to grant access to you site for GouteDriver/Selenium server through Nginx container.
Change Nginx to your web server service name if needed.
docker-compose -f docker-compose.yml -f docker-compose.behat.yml up -d
For additional information read about extending services and Compose files.
docker-compose -f docker-compose.yml -f docker-compose.behat.yml exec behat /srv/entrypoint.sh "{behat options}"
Notice that you must add at least one option to run tests.
COMPOSER_UPDATE: 1
- {some path}/composer.json:/srv/composer.json
E.x.,
- {some path}/drupal8:/drupal
api_driver: drupal
drush:
root: /drupal
drupal:
drupal_root: /drupal
Reports and text files with information about screenshots are saved in artifacts/ folder.
Screenshots will be uploaded to https://wsend.net/.
Content type
Image
Digest
Size
29.2 MB
Last updated
over 9 years ago
docker pull bergil/docker-behat