Module Development

Implement a Functional Test for Drupal 8, 9, and 10

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.