diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index ee45da3..fd734f1 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -619,8 +619,7 @@ protected function moduleData($module) {
 
       // If a module is within a profile directory but specifies another
       // profile for testing, it needs to be found in the parent profile.
-      $settings = $this->getConfigStorage()->read('simpletest.settings');
-      $parent_profile = !empty($settings['parent_profile']) ? $settings['parent_profile'] : NULL;
+      $parent_profile = Settings::get('test_parent_profile');
       if ($parent_profile && !isset($profiles[$parent_profile])) {
         // In case both profile directories contain the same extension, the
         // actual profile always has precedence.
diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
index 9681162..173d937 100644
--- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
+++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
@@ -237,8 +237,8 @@ public function setProfileDirectoriesFromSettings() {
     // For SimpleTest to be able to test modules packaged together with a
     // distribution we need to include the profile of the parent site (in
     // which test runs are triggered).
-    if (drupal_valid_test_ua() && !drupal_installation_attempted()) {
-      $testing_profile = \Drupal::config('simpletest.settings')->get('parent_profile');
+    if (drupal_valid_test_ua()) {
+      $testing_profile = Settings::get('test_parent_profile');
       if ($testing_profile && $testing_profile != $profile) {
         $this->profileDirectories[] = drupal_get_path('profile', $testing_profile);
       }
diff --git a/core/modules/simpletest/src/Tests/ParentProfileTest.php b/core/modules/simpletest/src/Tests/ParentProfileTest.php
new file mode 100644
index 0000000..49dafe6
--- /dev/null
+++ b/core/modules/simpletest/src/Tests/ParentProfileTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\simpletest\Tests\ParentProfileTest.
+ */
+
+namespace Drupal\simpletest\Tests;
+
+use Drupal\Core\Extension\ExtensionDiscovery;
+use Drupal\Core\Site\Settings;
+use Drupal\simpletest\KernelTestBase;
+
+/**
+ * Tests installation profile inheritance in tests.
+ */
+class ParentProfileTest extends KernelTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Test parent profile',
+      'description' => 'Tests installation profile inheritance in tests.',
+      'group' => 'SimpleTest',
+    );
+  }
+
+  /**
+   * Tests that the test runner's profile is inherited.
+   */
+  function testParentProfile() {
+    $settings = Settings::getAll();
+    $settings['test_parent_profile'] = 'testing';
+    $settings['install_profile'] = 'minimal';
+    new Settings($settings);
+
+    $discovery = new ExtensionDiscovery(\Drupal::root());
+    $modules = $discovery->scan('module');
+    $this->assertTrue(isset($modules['drupal_system_listing_compatible_test']));
+  }
+
+}
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 1f62ef4..f0cecf8 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -801,14 +801,14 @@ protected function setUp() {
     // Save the original site directory path, so that extensions in the
     // site-specific directory can still be discovered in the test site
     // environment.
-    // @see \Drupal\Core\SystemListing::scan()
+    // @see \Drupal\Core\Extension\ExtensionDiscovery::scan()
     $settings['settings']['test_parent_site'] = (object) array(
       'value' => $this->originalSite,
       'required' => TRUE,
     );
     // Add the parent profile's search path to the child site's search paths.
     // @see \Drupal\Core\Extension\ExtensionDiscovery::getProfileDirectories()
-    $settings['conf']['simpletest.settings']['parent_profile'] = (object) array(
+    $settings['settings']['test_parent_profile'] = (object) array(
       'value' => $this->originalProfile,
       'required' => TRUE,
     );
