diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 2c60f05..4727a03 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -294,6 +294,7 @@ class DrupalWebTestCase {
    * Run all tests in this class.
    */
   function run() {
+    set_time_limit(0);
     set_error_handler(array($this, 'errorHandler'));
     $methods = array();
     // Iterate through all the methods in this class.
diff --git a/modules/simpletest/simpletest.install b/modules/simpletest/simpletest.install
index f59701f..67475c0 100644
--- a/modules/simpletest/simpletest.install
+++ b/modules/simpletest/simpletest.install
@@ -107,6 +107,14 @@ function simpletest_requirements($phase) {
   $t = get_t();
 
   $has_curl = function_exists('curl_init');
+  
+  $max_execution_time = ini_get('max_execution_time');
+  if ($max_execution_time == 0 || $max_execution_time >= 240) {
+    $sufficient_execution_time = TRUE;
+  }
+  else {
+    $sufficient_execution_time = !ini_get('safe_mode') && function_exists('set_time_limit');
+  }
 
   switch ($phase) {
     case 'runtime':
@@ -115,6 +123,12 @@ function simpletest_requirements($phase) {
         'value' => $has_curl ? $t('Enabled') : $t('Not found'),
         'severity' => $has_curl ? REQUIREMENT_OK : REQUIREMENT_ERROR,
       );
+      $requirements['simpletest_execution_time'] = array(
+        'title' => $t('PHP maximum execution time'),
+        'value' => !$max_execution_time ? $t('Infinite') : format_interval($max_execution_time),
+        'severity' => $sufficient_execution_time ? REQUIREMENT_OK : REQUIREMENT_ERROR,
+        'description' => !$sufficient_execution_time ? $t('Please set your <em>max_execution_time</em> to a minimum of 240s.') : '',
+      );
       break;
     case 'install':
       if (!$has_curl) {
@@ -124,6 +138,13 @@ function simpletest_requirements($phase) {
           'description' => $t('Simpletest could not be installed because the PHP <a href="!curl_url">cURL</a> library is not available.', array('!curl_url' => 'http://php.net/manual/en/curl.setup.php')),
         );
       }
+      if (!$sufficient_execution_time) {
+        $requirements['simpletest_execution_time'] = array(
+          'title' => $t('PHP maximum execution time'),
+          'severity' => REQUIREMENT_ERROR,
+          'description' => $t('Simpletest could not be installed because the PHP <em>max_execution_time</em> setting is too low and cannot be changed at runtime.') . ' ' . $t('Please set your <em>max_execution_time</em> to a minimum of 240s.'),
+        );
+      }
       break;
   }
 
