Core tests

Last updated on
15 October 2016

Drupal core now comes with numerous tests for functionality (in the region of 50-70% code coverage as of June 2008).

When reviewing or writing patches, you should ensure that no new test failures are introduced by running all tests both before and after applying the patch. Ideally no patch should ever be marked RTBC if it breaks tests.

Since testing is still quite new in Drupal, there are currently some tests which fail in core due to exposing core bugs or issues in the test framework itself.

If you find a failing test that wasn't caused by your own changes, first check the issue queue to see if there's an existing report, or file a new bug report. There are also informal snapshots of known issues available in the Testing group on groups.drupal.org - http://groups.drupal.org/node/11993

If you think your test ought to pass, but still get fails or exceptions, please include as much information about your environment as possible - especially PHP, MySQL versions and operating system.