Drupal extension for Behat

Installs: 252 308

Dependents: 17

Stars: 62

Watchers: 20

Forks: 88

Open Issues: 28

Language: PHP

v3.1.2 2015-09-16 19:51 UTC


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.

Build Status

The Drupal Extension 3 supports Drupal 6, 7 and 8, and utilizes Behat 3.

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality

Use it for testing your Drupal site.

If you're new to the Drupal Extension, we recommend starting with the Full documentation

Documentation Status

Quick start

  1. Install using Composer:

    mkdir projectdir
    cd projectdir
    curl -sS https://getcomposer.org/installer | php
    php composer.phar require drupal/drupal-extension='~3.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

            - Drupal\DrupalExtension\Context\DrupalContext
          goutte: ~
          base_url: http://example.org/  # Replace with your site's URL
          blackbox: ~
  3. In the projectdir, run

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

    bin/behat -di
  5. Define your own steps in projectdir\features\FeatureContext.php

  6. Start adding your feature files to the features directory of your repository.

Additional resources

Examples and code snippets