Automated Testing for Drupal 8 Projects

Drupal 8 comes with a host of new test frameworks. The majority of these were initially developed in order to test the core code itself. In this session, we'll look at the different test types, and show how they can be used to test actual Drupal project builds and custom code.

We'll cover:

  • Unit tests
  • Kernel/integration tests
  • Functional tests
  • Functional JavaScript tests
  • Behat tests (Behavior Driven Development)
  • In-code assertions


Knowing when and how to use each different test type will enable building sites that are more stable, upgradeable, and readily refactorable and extendable. Additionally, writing code that is testable results in better code. And finally, knowing how to write tests to demonstrate a bug, or ensure a functional feature allows contributions to Drupal core (as tests there are nearly always required).

Session Track: 
Drupal 8
Experience level: