Writing tests

Documentation in progress...

Running tests

Running tests through the User Interface

Tests may be run through the user interface after enabling the Testing module. Visit /admin/config/development/testing to select the tests to run.

Running tests through the Command Line

Core includes a shell script under /core/scripts/run-tests.sh. This can be run from the command line such as:

# Run a single test class:
./core/scripts/run-tests.sh --url http://backdrop.dev --color --force --verbose BlockTestCase
# Run the entire test suite:
./core/scripts/run-tests.sh --url http://backdrop.dev --color --force --verbose --all

This script takes a variety of useful flags. Documentation may be found in the run-tests.sh documentation.

Running tests automatically on pull requests

Pull requests again Backdrop core will automatically be tested using the Zen.ci service. This service simply runs the run-tests.sh script and posts the result to the pull request.