diff --git modules/simpletest/drupal_web_test_case.php modules/simpletest/drupal_web_test_case.php
index 088b39c..ff2b10a 100644
--- modules/simpletest/drupal_web_test_case.php
+++ modules/simpletest/drupal_web_test_case.php
@@ -763,10 +763,18 @@ class DrupalWebTestCase extends DrupalTestCase {
   protected $redirect_count;
 
   /**
+   * The database auto_increment value.
+   *
+   * @var string
+   */
+  protected $autoIncrement;
+
+  /**
    * Constructor for DrupalWebTestCase.
    */
-  function __construct($test_id = NULL) {
+  function __construct($test_id = NULL, $auto_increment = 0) {
     parent::__construct($test_id);
+    $this->autoIncrement = $auto_increment;
     $this->skipClasses[__CLASS__] = TRUE;
   }
 
diff --git modules/simpletest/simpletest.install modules/simpletest/simpletest.install
index 135de03..b521335 100644
--- modules/simpletest/simpletest.install
+++ modules/simpletest/simpletest.install
@@ -167,5 +167,16 @@ function simpletest_schema() {
     ),
     'primary key' => array('test_id'),
   );
+  $schema['simpletest_auto_increment'] = array(
+    'description' => 'Table used to find out the value of the auto_increment of the database.',
+    'fields' => array(
+      'id'  => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique ID used to evaluate the value of auto_increment.',
+      ),
+    ),
+    'primary key' => array('id'),
+  );
   return $schema;
 }
diff --git modules/simpletest/simpletest.module modules/simpletest/simpletest.module
index 10fc6fb..1d86afc 100644
--- modules/simpletest/simpletest.module
+++ modules/simpletest/simpletest.module
@@ -130,6 +130,16 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
     ->useDefaults(array('test_id'))
     ->execute();
 
+  // Inserts two records in the database to find out the value of auto_increment
+  // for this database.
+  $auto_increment_id1 = db_insert('simpletest_auto_increment')
+    ->useDefaults(array('id'))
+    ->execute();
+  $auto_increment_id2 = db_insert('simpletest_auto_increment')
+    ->useDefaults(array('id'))
+    ->execute();
+  $auto_increment = $auto_increment_id2 - $auto_increment_id1;
+
   // Clear out the previous verbose files.
   file_unmanaged_delete_recursive('public://simpletest/verbose');
 
@@ -142,7 +152,7 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
   $batch = array(
     'title' => t('Running tests'),
     'operations' => array(
-      array('_simpletest_batch_operation', array($test_list, $test_id)),
+      array('_simpletest_batch_operation', array($test_list, $test_id, $auto_increment)),
     ),
     'finished' => '_simpletest_batch_finished',
     'progress_message' => '',
@@ -159,7 +169,7 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
 /**
  * Batch operation callback.
  */
-function _simpletest_batch_operation($test_list_init, $test_id, &$context) {
+function _simpletest_batch_operation($test_list_init, $test_id, $auto_increment, &$context) {
   // Get working values.
   if (!isset($context['sandbox']['max'])) {
     // First iteration: initialize working values.
@@ -176,7 +186,7 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) {
 
   // Perform the next test.
   $test_class = array_shift($test_list);
-  $test = new $test_class($test_id);
+  $test = new $test_class($test_id, $auto_increment);
   $test->run();
   $size = count($test_list);
   $info = $test->getInfo();
diff --git modules/simpletest/tests/database_test.test modules/simpletest/tests/database_test.test
index 38c1fa9..3d2ffac 100644
--- modules/simpletest/tests/database_test.test
+++ modules/simpletest/tests/database_test.test
@@ -2216,13 +2216,13 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
       ->fetchCol();
     $this->assertEqual($ages, array('George', 'Ringo'), t('Pager query with having expression returned the correct ages.'));
   }
-  
+
   /**
   * Confirm that every pager gets a valid non-overlaping element ID.
   */
   function testElementNumbers() {
     $_GET['page'] = '3, 2, 1, 0';
-    
+
     $name = db_select('test', 't')->extend('PagerDefault')
       ->element(2)
       ->fields('t', array('name'))
@@ -2231,7 +2231,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
       ->execute()
       ->fetchField();
     $this->assertEqual($name, 'Paul', t('Pager query #1 with a specified element ID returned the correct results.'));
-    
+
     // Setting an element smaller than the previous one
     // should not overwrite the pager $maxElement with a smaller value.
     $name = db_select('test', 't')->extend('PagerDefault')
@@ -2242,7 +2242,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
       ->execute()
       ->fetchField();
     $this->assertEqual($name, 'George', t('Pager query #2 with a specified element ID returned the correct results.'));
-  
+
     $name = db_select('test', 't')->extend('PagerDefault')
       ->fields('t', array('name'))
       ->orderBy('age')
@@ -2250,7 +2250,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
       ->execute()
       ->fetchField();
     $this->assertEqual($name, 'John', t('Pager query #3 with a generated element ID returned the correct results.'));
-    
+
     unset($_GET['page']);
   }
 }
@@ -3244,9 +3244,9 @@ class DatabaseNextIdCase extends DrupalWebTestCase {
     // We can test for exact increase in here because we know there is no
     // other process operating on these tables -- normally we could only
     // expect $second > $first.
-    $this->assertEqual($first + 1, $second, t('The second call from a sequence provides a number increased by one.'));
+    $this->assertEqual($first + $this->autoIncrement, $second, t('The second call from a sequence provides a number increased by the value of auto_increment.'));
     $result = db_next_id(1000);
-    $this->assertEqual($result, 1001, t('Sequence provides a larger number than the existing ID.'));
+    $this->assertTrue($result > 1000, t('Sequence provides a larger number than the existing ID.'));
   }
 }
 
