Last updated June 15, 2020

Drupal core comes with a script to help with running tests. This script has some distinct advantages over running tests directly via PHPUnit. It runs all tests in their own separate process, and can therefore handle PHP fatal errors without killing the test run. It's also the mechanism that the Drupal CI tools use to run tests so it can be handy when debugging tests that are failing on

In this tutorial we'll:

  • Look at the available options for the core script
  • Go through some examples of running tests using

By the end of this tutorial you'll know how to run your tests using