diff --git a/core/modules/simpletest/src/Form/SimpletestTestForm.php b/core/modules/simpletest/src/Form/SimpletestTestForm.php
index 8ad5fe2..3cac3f4 100644
--- a/core/modules/simpletest/src/Form/SimpletestTestForm.php
+++ b/core/modules/simpletest/src/Form/SimpletestTestForm.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\simpletest\Form;
 
+use Drupal\Core\Extension\ExtensionDiscovery;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\RendererInterface;
@@ -20,11 +21,22 @@ class SimpletestTestForm extends FormBase {
   protected $renderer;
 
   /**
+   * Path to the application root.
+   *
+   * We need this so that we can do discovery of extensions, and show the user
+   * which tests belong with which extension.
+   *
+   * @var string
+   */
+  protected $appRoot;
+
+  /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('renderer')
+      $container->get('renderer'),
+      (string) $container->get('app.root')
     );
   }
 
@@ -34,8 +46,9 @@ public static function create(ContainerInterface $container) {
    * @param \Drupal\Core\Render\RendererInterface $renderer
    *   The renderer.
    */
-  public function __construct(RendererInterface $renderer) {
+  public function __construct(RendererInterface $renderer, $app_root) {
     $this->renderer = $renderer;
+    $this->appRoot = $app_root;
   }
 
   /**
@@ -135,16 +148,30 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       (string) $this->renderer->renderPlain($image_extended),
     ];
 
+    // Get a list of all available extension names.
+    $extension_discovery = new ExtensionDiscovery($this->appRoot);
+    $extension_names = [];
+    $extension_types = ['module', 'theme', 'profile', 'theme engine'];
+    foreach($extension_types as $type) {
+      $extension_names[$type] = array_keys($extension_discovery->scan($type, TRUE));
+    }
     // Generate the list of tests arranged by group.
     $groups = simpletest_test_get_all();
     foreach ($groups as $group => $tests) {
+      // Add the extension type to group names which are also extension names.
+      foreach ($extension_types as $type) {
+        if (in_array($group, $extension_names[$type])) {
+          $group = $group . ' ' . $type;
+        }
+      }
+
       $form['tests'][$group] = array(
         '#attributes' => array('class' => array('simpletest-group')),
       );
 
       // Make the class name safe for output on the page by replacing all
       // non-word/decimal characters with a dash (-).
-      $group_class = 'module-' . strtolower(trim(preg_replace("/[^\w\d]/", "-", $group)));
+      $group_class = 'group-' . strtolower(trim(preg_replace("/[^\w\d]/", "-", $group)));
 
       // Override tableselect column with custom selector for this group.
       // This group-select-all checkbox is injected via JavaScript.
