diff --git a/core/modules/simpletest/src/Form/SimpletestTestForm.php b/core/modules/simpletest/src/Form/SimpletestTestForm.php
index ccd8fe8..384faee 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;
@@ -28,12 +29,23 @@ class SimpletestTestForm extends FormBase {
   protected $testDiscovery;
 
   /**
+   * 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('test_discovery')
+      $container->get('test_discovery'),
+      (string) $container->get('app.root')
     );
   }
 
@@ -45,9 +57,10 @@ public static function create(ContainerInterface $container) {
    * @param \Drupal\simpletest\TestDiscovery $test_discovery
    *   The test discovery service.
    */
-  public function __construct(RendererInterface $renderer, TestDiscovery $test_discovery) {
+  public function __construct(RendererInterface $renderer, TestDiscovery $test_discovery, $app_root) {
     $this->renderer = $renderer;
     $this->testDiscovery = $test_discovery;
+    $this->appRoot = $app_root;
   }
 
   /**
@@ -147,16 +160,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 = $this->testDiscovery->getTestClasses();
     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.
