Run Drupal Tests with PHPUnit for Drupal 8, Drupal 9, and Drupal 10

Last updated April 6, 2022
Module Development9.5.x/10.0.x

In this tutorial, we'll run tests in several different ways using the PHPUnit tools available in Drupal. We'll learn about various environment variables you'll need to supply to the test runner depending on which type of test you're running. And we'll learn various ways to get reports on the test results. By the end of this tutorial, you should understand how to run Drupal tests using PHPUnit.