Simpletest Testing overview (Drupal 7)
Testing in Drupal 7 focuses on functional testing instead of unit testing.
Testing module
The Testing module (Drupal 7.x and beyond) or SimpleTest module (Drupal 6.x) provides a framework for running automated unit and
Simpletest Testing tutorial (Drupal 7)
This tutorial will take you through the basics of testing in Drupal 7.
Unit Testing with SimpleTest
Drupal 7: There may be times when you want to write a traditional, simple unit test. Simpletest offers that functionality.
Organizing your test cases
Here are some suggestions for organizing your test cases. It is best to put your test cases in files with certain names in certain locations
Selenium testing
Selenium is a tool which automates browser testing, and so can be used to test your Drupal website.
Testing setup and configuration
SimpleTest has a few non-default requirements.
Writing upgrade path tests
This document explains how to write tests for the Drupal core upgrade path.
Running automated tests
Once you have completed the Setup and configuration (enabled the Testing module) you are ready to run some tests.
Running tests through command-line with run-tests.sh
Basics of how to use run-tests.sh from the command line.
Troubleshooting tests
Use the new debug()
SimpleTest upload tests hanging
SimpleTests involving file uploading of any kind result in the test never finishing on Mac OS X covering Leopard and possibly other versions
SimpleTest [Browser] on Vista
The Symptom
Improving SimpleTest performance
Performance: improving the speed of SimpleTest during development.
Testing Reference
The following resources provide some additional information on testing with Drupal. Please also read the sub-pages with more details.
API functions
The internal browser
Writing SimpleTest assertions
Find up to date SimpleTest documentation at the api.drupal.org reference site.
Why test
You should write SimpleTests for your modules to ensure quality. SimpleTests allow you, the developer, to quickly test your module after
Core tests
Drupal core now comes with numerous tests for functionality (in the region of 50-70% code coverage as of June 2008).
Hidden modules and themes
Sometimes, hooks we want to test are not used in any of the core modules, or core modules do not cover all the use cases of these hooks.
Comprehensive example
Now it's time to try a browser test. We don't have to change too much in our class, because DrupalWebTestCase class contains tools for both
Miscellaneous SimpleTest tips
This is a list of some general tips for writing tests, feel free to pitch in and add your own!