Automated testing

Introduction

Drupal comes with various automated testing options to choose from. Most of which are part of the core testing framework. The enriched functionalities and UI are provided by the new testing framework, PHPUnit. Testing can be done in different layers in order to confirm the quality and reaction of code on edge cases:

  1. Unit tests
  2. Kernel tests
  3. Functional tests

It is also possible to use an external framework like Behat with scenarios in Gherkin syntax.

PHPUnit in Drupal

Execute and write tests using Drupal's implementation of PHPUnit.

Browser testing using Cypress

Test modern apps directly in the browser

Converting SimpleTests to PHPUnit tests

Some notes on converting SimpleTest-based tests to PHPUnit tests.

JavaScript testing using Nightwatch

This documentation describes how to write Nightwatch tests

Performance tests

Drupal comes with a cutting-edge performance testing framework out of the box.

Run core development checks

On every merge request and patch submitted to Drupal a series of checks are run before testing. Learn how to run them locally.

Types of tests

Defines the type of tests, Unit, Kernel, Browser and Javascript tests.

Test failures

Tips for dealing with test failures.

Guide maintainers

peter majmesku's picture
vijaycs85's picture
francewhoa's picture
TylerMarshall's picture