Behavior-Driven Development with Behat Workshop
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 workshop 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 and have written 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.
Setup instructions:
It is highly recommended to use DrupalVM and configure it to use the drupal composer template. Follow the quickstart guide to install DrupalVM.