diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
index cd083b7..baab9fb 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
@@ -47,16 +47,11 @@ public function testBlockLinks() {
     ));
     $this->drupalLogin($admin_user);
 
-    $current_theme = variable_get('theme_default', 'stark');
-    $machine_name = 'test_aggregator_feed_block';
     $block = array(
-      'machine_name' => $machine_name,
-      'region' => 'footer',
       'title' => 'feed-' . $feed->title,
       'block_count' => 2,
     );
-    $this->drupalPost("admin/structure/block/manage/aggregator_feed_block:{$feed->fid}/$current_theme", $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'Block was saved.');
+    $this->drupalCreateBlockInstance('aggregator_feed_block:{$feed->fid}', NULL, $block);
 
     // Confirm that the block is now being displayed on pages.
     $this->drupalGet('node');
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/ImportOpmlTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/ImportOpmlTest.php
index 5eb110f..16c0027 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/ImportOpmlTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/ImportOpmlTest.php
@@ -49,15 +49,7 @@ function openImportForm() {
       ->execute();
 
     // Enable the help block.
-    $block_id = 'system_help_block';
-    $default_theme = variable_get('theme_default', 'stark');
-    $block = array(
-      'title' => $this->randomName(8),
-      'machine_name' => $this->randomName(8),
-      'region' => 'help',
-    );
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), '"Help" block enabled');
+    $this->drupalCreateBlockInstance('system_help_block', NULL, array('region' => 'help'));
 
     $this->drupalGet('admin/config/services/aggregator/add/opml');
     $this->assertText('A single OPML document may contain a collection of many feeds.', 'Found OPML help text.');
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
index 2c401e8..dcdbffa 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
@@ -49,12 +49,8 @@ function setUp() {
     $this->normal_user_alt->save();
 
     // Enable our test block.
-    $this->theme = variable_get('theme_default', 'stark');
-    $block = array();
-    $block['machine_name'] = $this->randomName(8);
-    $block['region'] = 'sidebar_first';
-    $this->block = $block;
-    $this->drupalPost('admin/structure/block/manage/test_cache/' . $this->theme,  $block, t('Save block'));
+   $block = $this->drupalCreateBlockInstance('test_cache');
+   $this->block_config_id = $block['config_id'];
   }
 
   /**
@@ -196,13 +192,11 @@ function testCachePerPage() {
    * Private helper method to set the test block's cache mode.
    */
   private function setCacheMode($cache_mode) {
-    $block = $this->block;
-    $block['config_id'] = 'plugin.core.block.' . $this->theme . '.' . $block['machine_name'];
-    $block_config = config($block['config_id']);
+    $block_config = config($this->block_config_id);
     $block_config->set('cache', $cache_mode);
     $block_config->save();
 
-    $instance = block_load($block['config_id']);
+    $instance = block_load($this->block_config_id);
     $config = $instance->getConfig();
     if ($config['cache'] != $cache_mode) {
       $this->fail(t('Unable to set cache mode to %mode. Current mode: %current_mode', array('%mode' => $cache_mode, '%current_mode' => $config['cache'])));
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php
index f33694e..06c7bf0 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php
@@ -46,14 +46,7 @@ function setUp() {
     );
 
     $this->drupalLogin($this->adminUser);
-
-    $default_theme = variable_get('theme_default', 'stark');
-
-    $block['machine_name'] = $this->randomName();
-    $block['region'] = 'sidebar_first';
-    $block['title'] = $this->randomName();
-    $this->drupalPost('admin/structure/block/manage/search_form_block/' . $default_theme, $block, t('Save block'));
-    $this->assertText('The block configuration has been saved.', 'Block was saved');
+    $this->DrupalCreateBlockInstance('search_form_block');
   }
 
   /**
@@ -61,8 +54,6 @@ function setUp() {
    */
   public function testBlockNotInHiddenRegion() {
 
-    $this->drupalLogin($this->adminUser);
-
     // Ensure that the search form block is displayed.
     $this->drupalGet('');
     $this->assertText('Search', 'Block was displayed on the front page.');
@@ -81,4 +72,5 @@ public function testBlockNotInHiddenRegion() {
     $this->drupalGet('');
     $this->assertText('Search', 'Block was displayed on the front page.');
   }
+
 }
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php
index 1bf3543..9d1927c 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php
@@ -46,11 +46,7 @@ function setUp() {
     state()->set('block_test.content', $current_content);
 
     // Enable our test block.
-    $default_theme = variable_get('theme_default', 'stark');
-    $block = array();
-    $block['machine_name'] = 'test_id_block';
-    $block['region'] = 'sidebar_first';
-    $this->drupalPost('admin/structure/block/manage/test_html_id' . '/' . $default_theme, array('machine_name' => $block['machine_name'], 'region' => $block['region']), t('Save block'));
+    $this->drupalCreateBlockInstance('test_html_id');
   }
 
   /**
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php
index da22d5a..2598396 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php
@@ -44,18 +44,9 @@ function setUp() {
    * Tests that blocks assigned to invalid regions work correctly.
    */
   function testBlockInInvalidRegion() {
-    // Enable a test block in the default theme and place it in an invalid region.
-    $current_theme = variable_get('default_theme', 'stark');
-    $machine_name = 'test_html_id';
-    $block = array(
-      'machine_name' => $machine_name,
-      'region' => 'footer',
-    );
-    $this->drupalPost("admin/structure/block/manage/test_html_id/$current_theme", $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'Block was saved.');
-
-    $machine_name = 'plugin.core.block.' . $current_theme . '.' . $machine_name;
-    $config = config($machine_name);
+    // Enable a test block and place it in an invalid region.
+    $block = $this->drupalCreateBlockInstance('test_html_id');
+    $config = config($block['config_id']);
     $config->set('region', 'invalid_region');
     $config->save();
 
diff --git a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php
index 8d04426..d92b183 100644
--- a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php
@@ -33,38 +33,18 @@ public static function getInfo() {
    * Check the enabled Bartik blocks are correctly copied over.
    */
   function testNewDefaultThemeBlocks() {
+    $default_theme = variable_get('theme_default', 'stark');
 
     // Add several block instances.
-    // @todo Do this programmatically and with test blocks instead of other
-    //   modules' blocks once block instances are config entities.
     $this->adminUser = $this->drupalCreateUser(array('administer blocks'));
     $this->drupalLogin($this->adminUser);
 
-    // Add one instance of the user login block.
-    $block_id = 'user_login_block';
-    $default_theme = variable_get('theme_default', 'stark');
-    $edit = array(
-      'title' => $this->randomName(8),
-      'machine_name' => $this->randomName(8),
-      'region' => 'sidebar_first',
-    );
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $edit, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'User login block enabled');
-
-    // Add another instance of the same block.
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $edit, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'User login block enabled');
+    // Add two instances of the user login block.
+    $this->drupalCreateBlockInstance('user_login_block');
+    $this->drupalCreateBlockInstance('user_login_block');
 
     // Add an instance of a different block.
-    $block_id = 'system_powered_by_block';
-    $edit = array(
-      'title' => $this->randomName(8),
-      'machine_name' => $this->randomName(8),
-      'region' => 'sidebar_first',
-    );
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $edit, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'User login block enabled');
-
+    $this->drupalCreateBlockInstance('system_powered_by_block');
     $this->drupalLogout($this->adminUser);
 
     // Enable a different theme.
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 4d5e452..227619d 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -309,16 +309,8 @@ function testBookExport() {
   function testBookNavigationBlock() {
     $this->drupalLogin($this->admin_user);
 
-    $block_id = 'book_navigation';
-    $default_theme = variable_get('theme_default', 'stark');
-    $block = array(
-      'title' => $this->randomName(8),
-      'machine_name' => $this->randomName(8),
-      'region' => 'footer',
-    );
     // Enable the block.
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'Block enabled');
+    $block = $this->drupalCreateBlockInstance('book_navigation');
 
     // Give anonymous users the permission 'node test view'.
     $edit = array();
@@ -329,7 +321,7 @@ function testBookNavigationBlock() {
     // Test correct display of the block.
     $nodes = $this->createBook();
     $this->drupalGet('<front>');
-    $this->assertText($block['title'], 'Book navigation block is displayed.');
+    $this->assertText($block['subject'], 'Book navigation block is displayed.');
     $this->assertText($this->book->label(), format_string('Link to book root (@title) is displayed.', array('@title' => $nodes[0]->label())));
     $this->assertNoText($nodes[0]->label(), 'No links to individual book pages are displayed.');
   }
@@ -339,17 +331,7 @@ function testBookNavigationBlock() {
    */
   function testNavigationBlockOnAccessModuleEnabled() {
     $this->drupalLogin($this->admin_user);
-    $block_id = 'book_navigation';
-    $default_theme = variable_get('theme_default', 'stark');
-    $block = array(
-      'title' => $this->randomName(8),
-      'machine_name' => $this->randomName(8),
-      'region' => 'footer',
-      'book_block_mode' => 'book pages',
-    );
-    // Enable the block.
-    $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'Block enabled');
+    $block = $this->drupalCreateBlockInstance('book_navigation', '', array('book_block_mode' => 'book pages'));
 
     // Give anonymous users the permission 'node test view'.
     $edit = array();
@@ -363,12 +345,12 @@ function testNavigationBlockOnAccessModuleEnabled() {
     // Test correct display of the block to registered users.
     $this->drupalLogin($this->web_user);
     $this->drupalGet('node/' . $this->book->nid);
-    $this->assertText($block['title'], 'Book navigation block is displayed to registered users.');
+    $this->assertText($block['subject'], 'Book navigation block is displayed to registered users.');
     $this->drupalLogout();
 
     // Test correct display of the block to anonymous users.
     $this->drupalGet('node/' . $this->book->nid);
-    $this->assertText($block['title'], 'Book navigation block is displayed to anonymous users.');
+    $this->assertText($block['subject'], 'Book navigation block is displayed to anonymous users.');
   }
 
   /**
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
index b874d7b..785a61c 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
@@ -46,16 +46,7 @@ public static function getInfo() {
    */
   function testRecentCommentBlock() {
     $this->drupalLogin($this->admin_user);
-    $current_theme = variable_get('default_theme', 'stark');
-    $machine_name = 'test_recent_comments';
-    $edit = array(
-      'machine_name' => $machine_name,
-      'region' => 'sidebar_first',
-      'title' => $this->randomName(),
-      'block_count' => 2,
-    );
-    $this->drupalPost('admin/structure/block/manage/recent_comments/' . $current_theme, $edit, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), 'Block was saved.');
+    $block = $this->drupalCreateBlockInstance('recent_comments', NULL, array('block_count' => 2));
 
     // Add some test comments, one without a subject.
     $comment1 = $this->postComment($this->node, $this->randomName(), $this->randomName());
@@ -70,14 +61,14 @@ function testRecentCommentBlock() {
     // posting a node from a node form.
     cache_invalidate_tags(array('content' => TRUE));
     $this->drupalGet('');
-    $this->assertNoText($edit['title'], 'Block was not found.');
+    $this->assertNoText($block['subject'], 'Block was not found.');
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
 
     // Test that a user with the 'access comments' permission can see the
     // block.
     $this->drupalLogin($this->web_user);
     $this->drupalGet('');
-    $this->assertText($edit['title'], 'Block was found.');
+    $this->assertText($block['subject'], 'Block was found.');
 
     // Test the only the 2 latest comments are shown and in the proper order.
     $this->assertNoText($comment1->subject, 'Comment not found in block.');
@@ -88,11 +79,12 @@ function testRecentCommentBlock() {
     // Set the number of recent comments to show to 10.
     $this->drupalLogout();
     $this->drupalLogin($this->admin_user);
-    $block = array(
+    $edit = array(
       'block_count' => 10,
     );
+    $current_theme = variable_get('theme_default', 'stark');
 
-    $this->drupalPost("admin/structure/block/manage/plugin.core.block.$current_theme.$machine_name/$current_theme/configure", $block, t('Save block'));
+    $this->drupalPost('admin/structure/block/manage/' . $block['config_id'] . '/' . variable_get('theme_default', 'stark') . '/configure', $edit, t('Save block'));
     $this->assertText(t('The block configuration has been saved.'), 'Block saved.');
 
     // Post an additional comment.
@@ -118,4 +110,5 @@ function testRecentCommentBlock() {
     // rel="canonical" is added to the head of the document.
     $this->assertRaw('<link rel="canonical"', 'Canonical URL was found in the HTML head');
   }
+
 }
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 4e3b101..42bf1b0 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -340,6 +340,78 @@ protected function drupalCreateContentType($settings = array()) {
   }
 
   /**
+   * Creates a block instance based on default settings.
+   *
+   * Note: Until this can be done programmatically, the active user account
+   * must have permission to administer blocks.
+   *
+   * @param string $plugin_id
+   *   The plugin ID of the block type for this block instance.
+   * @param string $theme
+   *   (optional) The theme for which to add a block instance. Defaults to the
+   *   default theme.
+   * @param array $settings
+   *   (optional) An associative array of settings for the block instance.
+   *   Override the defaults by specifying the key and value  in the array, for
+   *   example:
+   *   @code
+   *     $this->drupalCreateBlockInstance(array(
+   *       'title' => t('Hello, world!'),
+   *     ));
+   *   @endcode
+   *   The following defaults are provided:
+   *   - title: Random string.
+   *   - machine_name: Random string.
+   *   - region: 'sidebar_first'.
+   *
+   * @return ??|false
+   *   The block instance configuration, or FALSE on failure.
+   *
+   * @todo
+   *   Create the block programmatically once block instances are configuration
+   *   entities.
+   * @todo
+   *   Add support for creating custom block instances.
+   */
+  protected function drupalCreateBlockInstance($plugin_id, $theme = '', array $settings = array()) {
+    // Confirm that the active user has permission to add the block instance.
+    // @todo Remove this check once it is possible to do this programmatically.
+    if (!user_access('administer blocks', $this->loggedInUser)) {
+      $this->fail('The logged in user does not have permission to administer blocks.');
+      return FALSE;
+    }
+
+    // If no theme was specified, use the default theme.
+    $theme = variable_get('theme_default', 'stark');
+
+    // Populate some default block settings.
+    $settings += array(
+      'title' => $this->randomName(8),
+      'machine_name' => strtolower($this->randomName(8)),
+      'region' => 'sidebar_first',
+    );
+
+    // Submit the block instance configuration.
+    $this->drupalPost('admin/structure/block/manage/' . $plugin_id . '/' . $theme, $settings, t('Save block'));
+    $this->assertText(
+      t('The block configuration has been saved.'),
+      format_string(
+        '%plugin block instance added for %theme',
+        array(
+          '%plugin' => $plugin_id,
+          '%theme' => $theme,
+        )
+      )
+    );
+
+    // Return the created block instance.
+    $instance_id = "plugin.core.block.$theme." . $settings['machine_name'];
+    $manager = $this->container->get('plugin.manager.block');
+    $block = $manager->getInstance(array('config' => $instance_id));
+    return $block->getConfig();
+  }
+
+  /**
    * Get a list files that can be used in tests.
    *
    * @param $type
