The final thing we are going to do in this chapter is write automated tests to verify that our module works as anticipated. Again, some development methodologies call for writing tests before writing code. Such a methodology is perfectly applicable with Drupal modules. However, we have delayed writing tests until we had a little Drupal coding under our belts. Now that we have worked up a complete module, we are ready to write some tests.
Drupal uses an automated testing tool called SimpleTest (or just Testing). It is largely derived from the Open Source SimpleTest testing framework, though with many modifications. SimpleTest comes with Drupal 7.
In Drupal 6,
SimpleTest was an add-on module and required core patches. This ...