Kickstart for automated testing in Drupal Core

Speaker(s)

Lendude

Session track

Code & Development

Experience level

Expert

Duration

50 min

I’m Len Swaneveld, Lendude on Drupal.org. I’m currently one of the subsystem maintainers for Views in Drupal core, fairly active in the core Bug Smash Initiative and was one of the leads for the core PHPUnit Initiative.

This talk will focus on writing test for Drupal using the tooling that is available in Drupal core.

First I will talk a little about how to set up your development environment to run tests and pitfalls that are common when setting this up.

After that, the different types of tests that are available inside Drupal core will be discussed in depth. For example, what is a Kernel test, and when is this the right type of test to use? Or, when do you use BrowserTestBase and when WebDriverTestBase?

We will end on a note about how to start writing tests. Where to start, what to look for and what is expected if you want to get something committed to Drupal core.

Time permitting we might look at some example test code and step through it in detail.

A version of this talk was previously given at DrupalJam 2020

Session video: