On this page
Types of tests
PHPUnit
Most testing in current versions of Drupal is done under the PHPUnit framework. Drupal supports unit, integration, and system/functional testing using the PHPUnit framework.
In Drupal, there are 4 types of PHPUnit tests.
Unit
PHPUnit-based tests with minimal dependencies.
Base class: Drupal\Tests\UnitTestCase class.
Kernel
PHPUnit-based tests with a bootstrapped kernel, and a minimal number of extensions enabled.
Base class: Drupal\KernelTests\KernelTestBase class.
Functional
PHPUnit-based tests with a full booted Drupal instance.
Base class: Drupal\Tests\BrowserTestBase.
FunctionalJavascript
PHPUnit-based tests that use Webdriver to perform tests of Javascript and Ajax functionality in the browser.
There is a base class for general testing, Drupal\FunctionalJavascriptTests\WebDriverTestBase, and one for performance testing, Drupal\FunctionalJavascriptTests\PerformanceTestBase.
Nightwatch
Drupal project uses the Nightwatch framework for JavaScript testing. See JavaScript testing using Nightwatch.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion