Index: modules/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.14
diff -u -r1.14 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	15 Aug 2009 17:52:53 -0000	1.14
+++ modules/simpletest/simpletest.pages.inc	16 Aug 2009 18:30:51 -0000
@@ -180,11 +180,21 @@
 function simpletest_test_form_submit($form, &$form_state) {
   // Get list of tests.
   $tests_list = array();
+  $not_found = FALSE;
   foreach ($form_state['values'] as $class_name => $value) {
     if (class_exists($class_name) && $value === 1) {
       $tests_list[] = $class_name;
     }
+    else {
+      $not_found = TRUE;
+    }
+  }
+
+  if ($not_found) {
+    drupal_flush_all_caches();
+    drupal_set_message(t('One or more of the test classes was not found. The cache has been cleared to correct the issue.'), 'error');
   }
+
   if (count($tests_list) > 0 ) {
     simpletest_run_tests($tests_list, 'drupal');
   }
