2017 © Pedro Peláez
 

behat-extension drupal-extension

Drupal extension for Behat

image

drupal/drupal-extension

Drupal extension for Behat

  • Friday, May 18, 2018
  • by jhedstrom
  • Repository
  • 23 Watchers
  • 163 Stars
  • 1,840,776 Installations
  • PHP
  • 156 Dependents
  • 0 Suggesters
  • 158 Forks
  • 69 Open issues
  • 71 Versions
  • 8 % Grown

The README.md

Behat Drupal Extension

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., (*1)

ci, (*2)

The Drupal Extension 5.x supports Drupal 9 and 10, utilizes Behat 3.2+ and runs on:, (*3)

  • PHP 7.4, 8.0, 8.1 with Drupal 9
  • PHP 8.1 with Drupal 10.

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality, (*4)

Use it for testing your Drupal site.

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

Documentation Status, (*6)

Quick start

  1. Install using Composer:, (*7)

    bash mkdir projectdir cd projectdir curl -sS https://getcomposer.org/installer | php COMPOSER_BIN_DIR=bin php composer.phar require drupal/drupal-extension='~5.0', (*8)

  2. In the projectdir, create a file called behat.yml. Below is the minimal configuration. Many more options are covered in the Full documentation, (*9)

    yaml default: suites: default: contexts: - Drupal\DrupalExtension\Context\DrupalContext extensions: Drupal\MinkExtension: # Guzzle is used as HTTP client. You can configure the Guzzle request # options by setting `browserkit_http.guzzle_request_options`. For # instance the following configuration will disable SSL peer verification: # browserkit_http: # guzzle_request_options: # verify: false # See \GuzzleHttp\RequestOptions for all built-in Guzzle request options browserkit_http: ~ base_url: http://example.org/ # Replace with your site's URL Drupal\DrupalExtension: blackbox: ~, (*10)

  3. In the projectdir, run, (*11)

    bash bin/behat --init, (*12)

  4. Find pre-defined steps to work with using:, (*13)

    bin/behat -di
    
  5. Define your own steps in projectdir\features\FeatureContext.php, (*14)

  6. Start adding your feature files to the features directory of your repository., (*15)

Credits

Additional resources

Examples and code snippets

Release notes

See CHANGELOG., (*16)

Contributing

Features and bug fixes are welcome! First-time contributors can jump in with the issues tagged good first issue., (*17)

See CONTRIBUTING.md for more information., (*18)

The Versions