Skip to main content

Introduction to 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. The Drupal Extension 4 supports Drupal 6, 7 and 8, and utilized Behat 3.2+ and runs on PHP 5.5+. For Drupal 6 support (or Behat 2), use the 1.0 version.

The Drupal Extension to Behat and Mink assists in the performance of these common Drupal testing tasks:

  • Set up test data with Drush or the Drupal API. You can create node, users, vocabularies, taxonomy
  • Define theme regions and test data appears within them
  • Clear the cache, log out, and other useful steps
  • Detect and discover steps provided by contributed modules and themes

How Behat, Mink and Drupal Extension work together

  • Behat is a test framework for behavior-driven development (BDD) written in the PHP programming language. 
  • Mink removes API differences between different browser emulators providing different drivers for every browser emulator and providing you with an easy way to control the browser, traverse pages, manipulate page elements or interact with them.
  • Drupal Extension help in automation for Drupal Websites. The Drupal Extension to Behat and Mink assists in the performance of several common Drupal testing tasks.

Submitted by tgoswami on September 7, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.