Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.247
diff -u -p -r1.247 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	12 Nov 2010 03:06:52 -0000	1.247
+++ modules/simpletest/drupal_web_test_case.php	17 Nov 2010 18:58:14 -0000
@@ -431,8 +431,13 @@ abstract class DrupalTestCase {
 
   /**
    * Run all tests in this class.
+   *
+   * @param $methods
+   *   (optional) A list of class method names to run. By default, all methods
+   *   of the class are taken into account. Note that only methods starting with
+   *   "test" are executed.
    */
-  public function run() {
+  public function run(array $methods = array()) {
     // Initialize verbose debugging.
     simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), get_class($this));
 
@@ -447,8 +452,13 @@ abstract class DrupalTestCase {
 
     set_error_handler(array($this, 'errorHandler'));
     $class = get_class($this);
-    // Iterate through all the methods in this class.
-    foreach (get_class_methods($class) as $method) {
+    // Iterate through all the methods in this class, unless as specific list
+    // of methods to run was passed.
+    $class_methods = get_class_methods($class);
+    if ($methods) {
+      $class_methods = array_intersect($class_methods, $methods);
+    }
+    foreach ($class_methods as $method) {
       // If the current method starts with "test", run it - it's a test.
       if (strtolower(substr($method, 0, 4)) == 'test') {
         // Insert a fail record. This will be deleted on completion to ensure
