Implement a Functional Test for Drupal 8, Drupal 9

Last updated February 24, 2022
Module Development8.9.x/9.3.x

In this tutorial, We'll walk through the basics of how to implement a BrowserTestBase functional test. We'll assume you've already determined that you need to write a functional test and that you've Set up a Functional Test.

In this tutorial, we'll:

  • Determine the specifications of the test.
  • Walk through the behavior we want to test.
  • Document our test in the test class.
  • Implement the testing steps.
  • Make some decisions about how to deal with dependencies.