Sign inSign up

savaslabs/docker-behat

By savaslabs

Updated about 10 years ago

Lightweight drop-in behat container for docker projects. Fork of Bergil32/docker-behat

Image
0

911

savaslabs/docker-behat repository overview

Environment for running Behat tests.

Fork of https://github.com/Bergil32/docker-behat with the following changes:

  • Remove default feature file from /features
  • Remove all behat extensions from base image
  • Re-run composer install on entrypoint

To use in a project:

  • Create a directory named (for example) behat and copy this project's docker-compose.yml and composer.json into that directory.
  • Customize behat.yml, composer.json as needed and add tests into the /features directory.
  • Replace your-projects-network-name with the network name of the default network for your root docker-compose.yml file
  • If you need selenium, add a selenium container (e.g. selenium/standalone-chrome to your root dockerfile)
  • To run tests, run cd behat && docker-compose up.

Original project docs

The image and environment architecture are regularly updated. Check for updates.

This is tiny behat image based on Alpine Linux with PHP7.

This image includes:

Behat

Mink

Mink extension

Mink goutte driver

Mink selenium2 driver

Drupal extension

Guzzle

PHP Unit

Faker

PHPspec2-expect

Behat cucumber json formatter

Also, run script uses official selenium/standalone-chrome image.

In order to run tests:
  • Clone a repository.
git clone https://github.com/Bergil32/docker-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 and remove Test.feature.

  • Run the shell script.

sh run.sh
  • Reports and text files with information about screenshots are saved in artifacts/ folder.

  • Screenshots will be uploaded to https://wsend.net/.

Additional thanks to Serge Skripchuk for his help.

Tag summary

Content type

Image

Digest

Size

15.6 MB

Last updated

about 10 years ago

docker pull savaslabs/docker-behat