Simpletest

Drupal's old in-core test module, with a web page for running tests. Core dropped it for Drupal 9.0 in February 2020; tests now use PHPUnit.

Learn DrupalDrupal glossary

Simpletest was Drupal's own automated testing framework. It shipped as a core module, and developers ran its tests from the admin interface to check that a module or the site still worked. It was removed from core in Drupal 9, and PHPUnit replaced it. Drupal 11 has no Simpletest module.

Status today

Drupal.org issue 3110862, "Remove simpletest module from core", was committed to the 9.0.x branch on 12 February 2020. The issue notes that the module had been fully deprecated, that a hidden stub was left, that an update uninstalls the module on existing sites and that run-tests.sh support stayed. The issue's release note states that the module is removed from core in Drupal 9. The first release without it was 9.0.0-alpha2 (4 March 2020), whose notes say the module moved to contrib. Drupal 9.0.0 shipped only a hidden stub module named Testing, described as deprecated, and Drupal 10.0.0 no longer contains it.

A contributed Simpletest project still exists. Checked on 2026-10-26, its page says "Maintenance fixes only", describes the 8.x-3.x branch as a copy of core's old module for Drupal 8 and 9, and states that there are no supported stable releases. It tells maintainers to convert their tests to PHPUnit. Drupal 11.4.10 has no core route for a test page under /admin/config/development/testing, where the old module listed its tests.

What replaced it

PHPUnit is the standard for testing Drupal 8 and later. Core's phpunit.xml.dist defines the suites unit-component, unit, kernel, functional, functional-javascript and build. A module keeps its tests in matching folders, for example tests/src/Kernel and tests/src/Functional. The base classes are:

  • UnitTestCase for isolated classes;
  • KernelTestBase for code that needs services and a database but no installed site;
  • BrowserTestBase for functional tests that load pages;
  • WebDriverTestBase for functional tests that need JavaScript in a real browser.

The old name survives in a few places. The settings SIMPLETEST_BASE_URL and SIMPLETEST_DB in phpunit.xml.dist point PHPUnit at a site and a database, and Drupal.org's guide asks you to create a writable sites/simpletest directory. The script core/scripts/run-tests.sh still exists, but its own header says it is meant for Drupal.org testing and that tests should in general be run directly with phpunit.

Example

The Drupal.org guide runs the unit suite from the core folder, where phpunit.xml.dist lives, after you install the development dependencies with composer require drupal/core-dev --dev --update-with-all-dependencies:

cd core
        ../vendor/bin/phpunit --testsuite=unit

Kernel tests need a database: KernelTestBase throws an exception when the SIMPLETEST_DB variable is missing.

Common mistakes

  • Following an old tutorial. A guide written before Drupal 9 may assume a test page inside the admin interface. Drupal 11 core has none; write new tests against the PHPUnit base classes.
  • Installing the contributed project on a new site. It exists for teams that have not yet converted their tests. It has no supported stable release.
  • Running JavaScript tests through run-tests.sh. Drupal.org's guide warns against it; use phpunit with the functional-javascript suite.

For marketing and content teams

You will meet the word in a developer's estimate or an audit of an older site. If it mentions Simpletest tests, plan time to convert them: the Simpletest project page tells teams to convert remaining Simpletests to PHPUnit. Automated tests are what let a team change a site and see quickly that forms, listings and permissions still behave.

Sources

Questions about Simpletest

Not as a core feature. The module was removed from core in Drupal 9, and Drupal 11.4.10 contains no Simpletest module. The contributed project, checked on 2026-10-26, lists no supported stable release and tells teams to use PHPUnit.

PHPUnit. Drupal.org calls it the standard for testing Drupal 8 and later. Core defines the unit-component, unit, kernel, functional, functional-javascript and build test suites in core/phpunit.xml.dist, and you run them with the phpunit command.

The name survived in places. Core's phpunit.xml.dist still uses the variables SIMPLETEST_BASE_URL and SIMPLETEST_DB, and Drupal.org's setup guide still asks for a writable sites/simpletest directory. They configure PHPUnit, not the old module.

Related terms

All Drupal terms from A to Z