DrupalCon Seattle 2019: Behavior-Driven Development in Drupal 8 with Behat

Adding test coverage to your website and applications provides lots of benefits. For example, making sure requirements are met and preventing regressions from happening. One of the many approaches for testing is Behavior-Driven Development (BDD). This can be accomplished in Drupal 8 using a series of tools: Selenium, Behat, Mink, and Drupal Extension.

This session is for people who want to implement BDD in their Drupal projects. Through examples the role that each tool plays will be presented. The relationship among them and how they build on each other will also be exemplified.

By the end of it you will have an overview of how to use Selenium, Behat, Mink, and Drupal Extension to write BDD tests for Drupal 8.

Learning objectives:

How to set up Behat to run tests for Drupal 8 projects.
How to write non-javascript enabled tests using driver Goutte driver.
How to write javascript enabled tests using the Selenium driver.
How to configure Selenium to run tests from a virtual machine.

Drupal is a registered trademark of Dries Buytaert.