diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 5c39cfc..d17f280 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -84,6 +84,13 @@ abstract class DrupalTestCase {
   }
 
   /**
+   * Check if the test has the ability to run.
+   */
+  public static function getAccess() {
+    return TRUE;
+  }
+
+  /**
    * Internal helper: stores the assert.
    *
    * @param $status
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module
index ede9ac6..96db065 100644
--- a/modules/simpletest/simpletest.module
+++ b/modules/simpletest/simpletest.module
@@ -325,6 +325,12 @@ function simpletest_test_get_all() {
         // Test classes need to implement getInfo() to be valid.
         if (class_exists($class) && method_exists($class, 'getInfo')) {
           $info = call_user_func(array($class, 'getInfo'));
+          
+          // Check if we have access to the class.
+          $access = call_user_func(array($class, 'getAccess'));
+          if (empty($access)) {
+            continue;
+          }
 
           // If this test class requires a non-existing module, skip it.
           if (!empty($info['dependencies'])) {
