brainsum / drupal-behat-testing
Drupal testing with Behat.
Installs: 147
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 2
Type:behat-extension
Requires
- php: ^7.2
- ext-json: *
- ext-zip: *
- behat/behat: ^3.5
- behat/debug-extension: ^1.0
- behat/mink: ^1.7
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.3
- behat/mink-goutte-driver: ^1.2
- behat/mink-selenium2-driver: ^1.3
- bex/behat-screenshot: ^1.2
- ciaranmcnulty/behat-stepthroughextension: ^1.0
- drupal/core: ^8.6
- drupal/drupal-extension: ^4.0
- facebook/webdriver: ^1.7
- jcalderonzumba/gastonjs: ^1.2
- jcalderonzumba/mink-phantomjs-driver: ^0.3.3
- novaway/common-contexts: ^2.3
- phpunit/phpunit: ^6.5
- sensiolabs/behat-page-object-extension: ^2.3
- symfony/browser-kit: ^3.4
- symfony/console: ^3.4
- symfony/yaml: ^3.4
- vanare/behat-cucumber-json-formatter: ^1.1
- zalas/behat-no-extension: ^2.1
Requires (Dev)
- bossa/phpspec2-expect: ^3.1
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0
- drupal-composer/drupal-security-advisories: 8.x-dev
- drupal/coder: ^8.3
- jakub-onderka/php-parallel-lint: ^1.0
- phpcompatibility/php-compatibility: ^9.3
- roave/security-advisories: dev-master
Suggests
- drupal/scheduled_updates: Required for using the ScheduledUpdateTrait.
README
@todo: Finish.
Setup
Docker
Use Docker 4 Drupal
Drush 9
Create a drush/sites
folder with self.sites.yml
and add:
docker-local: root: /var/www/html/web uri: 'http://nginx'
Start
@todo: Add helper scripts.
docker-compose <docker-compose.yml for project> <docker-compose.selenium.yml from this package> up -d
- Wait for your site and selenium to spin up (shouldn't take long, a few seconds at most)
docker-compose <docker-compose.yml for project> <docker-compose.selenium.yml from this package> exec php sh -c "cd tests/behat && ../../vendor/bin/behat --out=std --config <your behat.yml> --stop-on-failure --verbose"
Advanced usages
Context DI
For some info about DI in contexts, see the DI.md doc.