Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brainsum/drupal-behat-testing

Common Behat-related things for testing Drupal sites
https://github.com/brainsum/drupal-behat-testing

behat behat-contexts behat-extension brainsum drupal drupal-8 testing-tools

Last synced: about 1 month ago
JSON representation

Common Behat-related things for testing Drupal sites

Awesome Lists containing this project

README

        

# Behat for Drupal

@todo: Finish.

## Setup

### Docker

Use [Docker 4 Drupal](https://github.com/wodby/docker4drupal)

### Drush 9

Create a `drush/sites` folder with `self.sites.yml` and add:
```yaml
docker-local:
root: /var/www/html/web
uri: 'http://nginx'
```

## Start

@todo: Add helper scripts.

- `docker-compose up -d`
- Wait for your site and selenium to spin up (shouldn't take long, a few seconds at most)
- `docker-compose exec php sh -c "cd tests/behat && ../../vendor/bin/behat --out=std --config --stop-on-failure --verbose"`

## Advanced usages
### Context DI

For some info about DI in contexts, see the [DI.md](docs/DI.md) doc.