Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By alexpott on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.6.x
Introduced in version:
8.6.0
Issue links:
Description:
Drupal now ships with commands to install a test site and tear it down. To install a test site run:
php core/scripts/test-site.php install --json
This will output information about the test site in a JSON format if successful. For example:
{"db_prefix":"test22029735","user_agent":"simpletest22029735:1518188974:5a7db9aee752c4.29037117:Vvw9BjAc-58eRlb95RphcXV4Xeb72-eWTba4XYtc4pY"}
To tear down the site:
php core/scripts/test-site.php tear-down test22029735
Other features:
// Get general help.
php core/scripts/test-site.php
// Get specific help.
php core/scripts/test-site.php help install
php core/scripts/test-site.php help tear-down
Impacts:
Module developers