docomoinnovations / drupal-extension
Drupal extension for Behat
Fund package maintenance!
docomoinnovations
Installs: 14 374
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 192
Open Issues: 1
Type:behat-extension
Requires
- behat/behat: ~3.2
- behat/mink: ~1.5
- behat/mink-extension: ~2.0
- behat/mink-goutte-driver: ~1.0
- behat/mink-selenium2-driver: ~1.1
- drupal/drupal-driver: ^2.1.0
- symfony/browser-kit: ^3.4|~4.4
- symfony/dependency-injection: ~3.0|~4.4
- symfony/translation: ^3.4|~4.4
Requires (Dev)
- drupal/coder: ^8.3
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpspec/phpspec: ~2.0 || ~4.0
- 6.x-dev
- 5.x-dev
- dev-master / 4.1.x-dev
- v4.1.0
- v4.0.1
- v4.0.0
- v4.0.0rc1
- v4.0.0beta2
- v4.0.0beta1
- v4.0.0alpha4
- v4.0.0alpha3
- v4.0.0alpha2
- v4.0.0alpha1
- v3.4.1
- v3.4.0
- v3.3.1
- v3.3.0
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- 3.1.0
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- 3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-6.x-suggestions
This package is auto-updated.
Last update: 2024-11-27 00:46:14 UTC
README
The Drupal Extension is an integration layer between Behat, Mink Extension, and Drupal. It provides step definitions for common testing scenarios specific to Drupal sites.
The Drupal Extension 5.x supports Drupal 9 and 10, utilizes Behat 3.2+ and runs on:
- PHP 7.4, 8.0, 8.1 with Drupal 9
- PHP 8.1 with Drupal 10.
Use it for testing your Drupal site.
If you're new to the Drupal Extension, we recommend starting with the Full documentation
Quick start
-
Install using Composer:
mkdir projectdir cd projectdir curl -sS https://getcomposer.org/installer | php COMPOSER_BIN_DIR=bin php composer.phar require drupal/drupal-extension='~5.0'
-
In the projectdir, create a file called
behat.yml
. Below is the minimal configuration. Many more options are covered in the Full documentation
default: suites: default: contexts: - Drupal\DrupalExtension\Context\DrupalContext extensions: Drupal\MinkExtension: browserkit_http: ~ base_url: http://example.org/ # Replace with your site's URL Drupal\DrupalExtension: blackbox: ~
-
In the projectdir, run
bin/behat --init
-
Find pre-defined steps to work with using:
bin/behat -di
-
Define your own steps in
projectdir\features\FeatureContext.php
-
Start adding your feature files to the
features
directory of your repository.
Credits
- Originally developed by Jonathan Hedstrom with great help from eliza411
- Maintainers
Additional resources
Examples and code snippets
- Complex node creation, with field collections and entity references
- Achievements module support
- Drupal form element visibility
- Track down PHP notices
- Support for sites using basic HTTP authentication
Release notes
See CHANGELOG.
Contributing
Features and bug fixes are welcome! First-time contributors can jump in with the issues tagged good first issue.
See CONTRIBUTING.md for more information.