PHPackages                             boga881/drupal-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. boga881/drupal-extension

ActiveBehat-extension

boga881/drupal-extension
========================

Drupal extension for Behat

086PHP

Since Feb 15Pushed 3y agoCompare

[ Source](https://github.com/boga881/drupalextension)[ Packagist](https://packagist.org/packages/boga881/drupal-extension)[ RSS](/packages/boga881-drupal-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Behat Drupal Extension
======================

[](#behat-drupal-extension)

The Drupal Extension is an integration layer between [Behat](http://behat.org), [Mink Extension](https://github.com/Behat/MinkExtension), and Drupal. It provides step definitions for common testing scenarios specific to Drupal sites.

[![ci](https://github.com/jhedstrom/drupalextension/actions/workflows/ci.yml/badge.svg)](https://github.com/jhedstrom/drupalextension/actions/workflows/ci.yml)

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.

[![Latest Stable Version](https://camo.githubusercontent.com/78d3fbcdfc4a717a18d3b5d0cfe05e5d2703b59fac7288c29afdd2ad4cfcc40f/68747470733a2f2f706f7365722e707567782e6f72672f64727570616c2f64727570616c2d657874656e73696f6e2f762f737461626c652e737667)](https://packagist.org/packages/drupal/drupal-extension)[![Total Downloads](https://camo.githubusercontent.com/f2e1e51a961b3d1af80d631bf65c0d3f90a4aa01eadcee890af5ae5dbc316add/68747470733a2f2f706f7365722e707567782e6f72672f64727570616c2f64727570616c2d657874656e73696f6e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/drupal/drupal-extension)[![Latest Unstable Version](https://camo.githubusercontent.com/3a58d1bf91b187a7374ef25a8f2e7f8617aa59d32c1d286d0036b856c6e34c70/68747470733a2f2f706f7365722e707567782e6f72672f64727570616c2f64727570616c2d657874656e73696f6e2f762f756e737461626c652e737667)](https://packagist.org/packages/drupal/drupal-extension)[![License](https://camo.githubusercontent.com/4e468b66f72b1e9a1e7305d0b7966316e51708487ab71855e6577727140d22f6/68747470733a2f2f706f7365722e707567782e6f72672f64727570616c2f64727570616c2d657874656e73696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/drupal/drupal-extension)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/39cb722d1506a45cf8290ead7a3d0bd502b4ab9913a31251cf84e77ddddf1f89/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6865647374726f6d2f64727570616c657874656e73696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jhedstrom/drupalextension/?branch=master)

Use it for testing your Drupal site.
------------------------------------

[](#use-it-for-testing-your-drupal-site)

If you're new to the Drupal Extension, we recommend starting with the [Full documentation](https://behat-drupal-extension.readthedocs.org)

[![Documentation Status](https://camo.githubusercontent.com/73869ecf662b5b59c28f5c6c440c1ac7f13acf4c657326fc93f1ac64de80374f/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f62656861742d64727570616c2d657874656e73696f6e2f62616467652f3f76657273696f6e3d6d6173746572)](https://behat-drupal-extension.readthedocs.org)

### Quick start

[](#quick-start)

1. Install using [Composer](https://getcomposer.org/):

    ```
    mkdir projectdir
    cd projectdir
    curl -sS https://getcomposer.org/installer | php
    COMPOSER_BIN_DIR=bin php composer.phar require drupal/drupal-extension='~5.0'
    ```
2. In the projectdir, create a file called `behat.yml`. Below is the minimal configuration. Many more options are covered in the [Full documentation](https://behat-drupal-extension.readthedocs.org)

```
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: ~
```

1. In the projectdir, run

    ```
    bin/behat --init
    ```
2. Find pre-defined steps to work with using:

    ```
    bin/behat -di
    ```
3. Define your own steps in `projectdir\features\FeatureContext.php`
4. Start adding your [feature files](http://behat.org/en/latest/user_guide/gherkin.html)to the `features` directory of your repository.

Credits
-------

[](#credits)

- Originally developed by [Jonathan Hedstrom](https://github.com/jhedstrom) with great help from [eliza411](https://github.com/eliza411)
- Maintainers
    - [Pieter Frenssen](https://github.com/pfrenssen)
    - [All these great contributors](https://github.com/jhedstrom/drupalextension/graphs/contributors)

Additional resources
--------------------

[](#additional-resources)

- [Behat Drupal Extension documentation](https://behat-drupal-extension.readthedocs.org)
- [Behat documentation](http://docs.behat.org)
- [Mink documentation](http://mink.behat.org)
- [Drupal Behat group](http://groups.drupal.org/behat)

Examples and code snippets
--------------------------

[](#examples-and-code-snippets)

- [Complex node creation, with field collections and entity references](https://gist.github.com/jhedstrom/5708233)
- [Achievements module support](https://gist.github.com/jhedstrom/9633067)
- [Drupal form element visibility](https://gist.github.com/pbuyle/7698675)
- [Track down PHP notices](https://www.godel.com.au/blog/use-behat-track-down-php-notices-they-take-over-your-drupal-site-forever)
- [Support for sites using basic HTTP authentication](https://gist.github.com/jhedstrom/5bc5192d6dacbf8cc459)

Release notes
-------------

[](#release-notes)

See [CHANGELOG](CHANGELOG.md).

Contributing
------------

[](#contributing)

Features and bug fixes are welcome! First-time contributors can jump in with the issues tagged [good first issue](https://github.com/jhedstrom/drupalextension/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).

See [CONTRIBUTING.md](https://github.com/jhedstrom/drupalextension/blob/master/CONTRIBUTING.md) for more information.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2935f9df8522b1eb3052ed4b423c8a2ff217b1fc945fb5125a81f9519a2d371?d=identicon)[boga881](/maintainers/boga881)

---

Top Contributors

[![jhedstrom](https://avatars.githubusercontent.com/u/76833?v=4)](https://github.com/jhedstrom "jhedstrom (865 commits)")[![pfrenssen](https://avatars.githubusercontent.com/u/442924?v=4)](https://github.com/pfrenssen "pfrenssen (164 commits)")[![claudiu-cristea](https://avatars.githubusercontent.com/u/473868?v=4)](https://github.com/claudiu-cristea "claudiu-cristea (55 commits)")[![eliza411](https://avatars.githubusercontent.com/u/216054?v=4)](https://github.com/eliza411 "eliza411 (31 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (23 commits)")[![jonathanjfshaw](https://avatars.githubusercontent.com/u/3512385?v=4)](https://github.com/jonathanjfshaw "jonathanjfshaw (22 commits)")[![dawehner](https://avatars.githubusercontent.com/u/29678?v=4)](https://github.com/dawehner "dawehner (19 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (13 commits)")[![cboyden](https://avatars.githubusercontent.com/u/725267?v=4)](https://github.com/cboyden "cboyden (13 commits)")[![Berdir](https://avatars.githubusercontent.com/u/40826?v=4)](https://github.com/Berdir "Berdir (12 commits)")[![jose-carmona](https://avatars.githubusercontent.com/u/2102206?v=4)](https://github.com/jose-carmona "jose-carmona (10 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (9 commits)")[![subhojit777](https://avatars.githubusercontent.com/u/1435641?v=4)](https://github.com/subhojit777 "subhojit777 (6 commits)")[![clemens-tolboom](https://avatars.githubusercontent.com/u/371014?v=4)](https://github.com/clemens-tolboom "clemens-tolboom (5 commits)")[![tanarurkerem](https://avatars.githubusercontent.com/u/1073944?v=4)](https://github.com/tanarurkerem "tanarurkerem (5 commits)")[![aronbeal](https://avatars.githubusercontent.com/u/2242035?v=4)](https://github.com/aronbeal "aronbeal (5 commits)")[![LionsAd](https://avatars.githubusercontent.com/u/354804?v=4)](https://github.com/LionsAd "LionsAd (4 commits)")[![greggles](https://avatars.githubusercontent.com/u/392568?v=4)](https://github.com/greggles "greggles (4 commits)")[![haringsrob](https://avatars.githubusercontent.com/u/866743?v=4)](https://github.com/haringsrob "haringsrob (4 commits)")[![grasmash](https://avatars.githubusercontent.com/u/539205?v=4)](https://github.com/grasmash "grasmash (4 commits)")

### Embed Badge

![Health badge](/badges/boga881-drupal-extension/health.svg)

```
[![Health](https://phpackages.com/badges/boga881-drupal-extension/health.svg)](https://phpackages.com/packages/boga881-drupal-extension)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
