diff --git a/tests/base.test b/tests/base.test
index 8de5fe7..e6c32fc 100644
--- a/tests/base.test
+++ b/tests/base.test
@@ -303,10 +303,18 @@ abstract class ViewsDataExportBaseTest extends ViewsTestCase {
     $this->verbose('View result:<br><pre>' . check_plain($result) .'</pre>');
   }
 
+  public function assertBatchedExportEqual($path, $expected, $message) {
+    $this->drupalGet($path);
+    $output = $this->drupalGetContent();
+    $this->logViewResult($output);
+    $this->logViewResult($expected);
+    $this->assertEqual($this->normaliseString($output), $this->normaliseString($expected), $message);
+  }
+
   public function assertExportEqual($a, $b, $message) {
     $this->logViewResult($a);
     $this->logViewResult($b);
-    $this->assertEqual($this->normaliseString($a), $this->normaliseString($b), 'Non batched CSV export matched expected output.');
+    $this->assertEqual($this->normaliseString($a), $this->normaliseString($b), $message);
   }
 
   protected function normaliseString($s) {
@@ -318,4 +326,90 @@ abstract class ViewsDataExportBaseTest extends ViewsTestCase {
     return $s;
   }
 
+}
+
+abstract class ViewsDataExportSimpleExportTest extends ViewsDataExportBaseTest {
+
+  protected $vde_export_type;
+
+  public function testNonBatchedExport() {
+    list($view, $expected) = $this->getExportView();
+
+    $result = $view->execute_display('vde_test');
+
+    $this->assertExportEqual($result, $expected, 'Non batched ' . $this->vde_export_type . ' export matched expected output.');
+  }
+
+  public function testBatchedExport() {
+    $path = 'vde_test/' . $this->randomName();
+    list($view, $expected) = $this->getExportView($path);
+    $display = &$view->display['vde_test']->handler;
+    // Set this view to be batched.
+    $display->override_option('use_batch', 'batch');
+    // Save this view so we can hit the path.
+    $view->save();
+
+    $this->resetAll();
+
+    $this->assertBatchedExportEqual($path, $expected, 'Batched ' . $this->vde_export_type . ' export matched expected output.');
+  }
+
+  abstract protected function getExportView($path = 'vde_test');
+
+  /**
+   * Build and return a basic view of the views_test table.
+   *
+   * @return view
+   */
+  protected function getBasicExportView() {
+    views_include('view');
+
+    // Create the basic view.
+    $view = new view();
+    $view->vid = 'new';
+    $view->base_table = 'views_test';
+
+    // Set up the fields we need.
+    $display = $view->new_display('default', 'Master', 'default');
+
+    $display->override_option('fields', array(
+      'id' => array(
+        'id' => 'id',
+        'table' => 'views_test',
+        'field' => 'id',
+        'relationship' => 'none',
+      ),
+      'name' => array(
+        'id' => 'name',
+        'table' => 'views_test',
+        'field' => 'name',
+        'relationship' => 'none',
+      ),
+      'age' => array(
+        'id' => 'age',
+        'table' => 'views_test',
+        'field' => 'age',
+        'relationship' => 'none',
+      ),
+    ));
+
+    // Set up the sort order.
+    $display->override_option('sorts', array(
+      'id' => array(
+        'order' => 'ASC',
+        'id' => 'id',
+        'table' => 'views_test',
+        'field' => 'id',
+        'relationship' => 'none',
+      ),
+    ));
+
+    // Set up the pager.
+    $display->override_option('pager', array(
+      'type' => 'none',
+      'options' => array('offset' => 0),
+    ));
+
+    return $view;
+  }
 }
\ No newline at end of file
diff --git a/tests/csv_export.test b/tests/csv_export.test
index d6e66fe..70c96ed 100644
--- a/tests/csv_export.test
+++ b/tests/csv_export.test
@@ -1,6 +1,6 @@
 <?php
 
-class CSVExportViewsDataExportTests extends ViewsDataExportBaseTest {
+class CSVExportViewsDataExportTests extends ViewsDataExportSimpleExportTest {
 
   protected $profile = 'testing';
 
@@ -12,10 +12,16 @@ class CSVExportViewsDataExportTests extends ViewsDataExportBaseTest {
     );
   }
 
-  public function testNonBatchedExport() {
-    $view = $this->getCSVExportView();
+  protected $vde_export_type = 'CSV';
+
+  protected function getExportView($path = 'vde_test') {
+    // Create the basic view.
+    $view = $this->getBasicExportView();
+
+    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
+    $display->override_option('style_plugin', 'views_data_export_csv');
+    $display->override_option('path', $path);
 
-    $result = $view->execute_display('vde_test');
     $expected = '"ID","Name","Age"
 "1","John","25"
 "2","George","27"
@@ -23,69 +29,7 @@ class CSVExportViewsDataExportTests extends ViewsDataExportBaseTest {
 "4","Paul","26"
 "5","Meredith","30"';
 
-    $this->assertExportEqual($result, $expected, 'Non batched CSV export matched expected output.');
-  }
-
-  /**
-   * Build and return a basic view of the views_test table.
-   *
-   * @return view
-   */
-  protected function getCSVExportView() {
-    views_include('view');
-
-    // Create the basic view.
-    $view = new view();
-    $view->vid = 'test_view';
-    $view->base_table = 'views_test';
-
-    // Set up the fields we need.
-    $display = $view->new_display('default', 'Master', 'default');
-
-    $display->override_option('fields', array(
-      'id' => array(
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'id' => 'name',
-        'table' => 'views_test',
-        'field' => 'name',
-        'relationship' => 'none',
-      ),
-      'age' => array(
-        'id' => 'age',
-        'table' => 'views_test',
-        'field' => 'age',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the sort order.
-    $display->override_option('sorts', array(
-      'id' => array(
-        'order' => 'ASC',
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the pager.
-    $display->override_option('pager', array(
-      'type' => 'none',
-      'options' => array('offset' => 0),
-    ));
-
-    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
-    $display->override_option('style_plugin', 'views_data_export_csv');
-    $display->override_option('path', 'vde_test');
-
-
-    return $view;
+    return array(&$view, $expected);
   }
 
 }
\ No newline at end of file
diff --git a/tests/doc_export.test b/tests/doc_export.test
index 675fff5..72e24c3 100644
--- a/tests/doc_export.test
+++ b/tests/doc_export.test
@@ -1,6 +1,6 @@
 <?php
 
-class DOCExportViewsDataExportTests extends ViewsDataExportBaseTest {
+class DOCExportViewsDataExportTests extends ViewsDataExportSimpleExportTest {
 
   protected $profile = 'testing';
 
@@ -12,10 +12,16 @@ class DOCExportViewsDataExportTests extends ViewsDataExportBaseTest {
     );
   }
 
-  public function testNonBatchedExport() {
-    $view = $this->getDocExportView();
+  protected $vde_export_type = 'DOC';
+
+  protected function getExportView($path = 'vde_test') {
+    // Create the basic view.
+    $view = $this->getBasicExportView();
+
+    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
+    $display->override_option('style_plugin', 'views_data_export_doc');
+    $display->override_option('path', $path);
 
-    $result = $view->execute_display('vde_test');
     $expected = '<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -32,69 +38,7 @@ class DOCExportViewsDataExportTests extends ViewsDataExportBaseTest {
   </body>
 </html>';
 
-    $this->assertExportEqual($result, $expected, 'Non batched DOC export matched expected output.');
-  }
-
-  /**
-   * Build and return a basic view of the views_test table.
-   *
-   * @return view
-   */
-  protected function getDOCExportView() {
-    views_include('view');
-
-    // Create the basic view.
-    $view = new view();
-    $view->vid = 'test_view';
-    $view->base_table = 'views_test';
-
-    // Set up the fields we need.
-    $display = $view->new_display('default', 'Master', 'default');
-
-    $display->override_option('fields', array(
-      'id' => array(
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'id' => 'name',
-        'table' => 'views_test',
-        'field' => 'name',
-        'relationship' => 'none',
-      ),
-      'age' => array(
-        'id' => 'age',
-        'table' => 'views_test',
-        'field' => 'age',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the sort order.
-    $display->override_option('sorts', array(
-      'id' => array(
-        'order' => 'ASC',
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the pager.
-    $display->override_option('pager', array(
-      'type' => 'none',
-      'options' => array('offset' => 0),
-    ));
-
-    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
-    $display->override_option('style_plugin', 'views_data_export_doc');
-    $display->override_option('path', 'vde_test');
-
-
-    return $view;
+    return array(&$view, $expected);
   }
 
-}
\ No newline at end of file
+}
diff --git a/tests/module/views_data_export_test.info b/tests/module/views_data_export_test.info
deleted file mode 100644
index e3bf3b5..0000000
--- a/tests/module/views_data_export_test.info
+++ /dev/null
@@ -1,5 +0,0 @@
-name = "Views data export testing"
-version = VERSION
-core = 7.x
-dependencies[] = views_data_export
-hidden = TRUE
\ No newline at end of file
diff --git a/tests/module/views_data_export_test.module b/tests/module/views_data_export_test.module
deleted file mode 100644
index b3d9bbc..0000000
--- a/tests/module/views_data_export_test.module
+++ /dev/null
@@ -1 +0,0 @@
-<?php
diff --git a/tests/txt_export.test b/tests/txt_export.test
index ec84747..35c7f00 100644
--- a/tests/txt_export.test
+++ b/tests/txt_export.test
@@ -1,6 +1,6 @@
 <?php
 
-class TXTExportViewsDataExportTests extends ViewsDataExportBaseTest {
+class TXTExportViewsDataExportTests extends ViewsDataExportSimpleExportTest {
 
   protected $profile = 'testing';
 
@@ -12,10 +12,16 @@ class TXTExportViewsDataExportTests extends ViewsDataExportBaseTest {
     );
   }
 
-  public function testNonBatchedExport() {
-    $view = $this->getTXTExportView();
+  protected $vde_export_type = 'TXT';
+
+  protected function getExportView($path = 'vde_test') {
+    // Create the basic view.
+    $view = $this->getBasicExportView();
+
+    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
+    $display->override_option('style_plugin', 'views_data_export_txt');
+    $display->override_option('path', $path);
 
-    $result = $view->execute_display('vde_test');
     $expected = '[ID]
 
 1
@@ -71,69 +77,7 @@ Meredith
 30
 ----------------------------------------';
 
-    $this->assertExportEqual($result, $expected, 'Non batched TXT export matched expected output.');
-  }
-
-  /**
-   * Build and return a basic view of the views_test table.
-   *
-   * @return view
-   */
-  protected function getTXTExportView() {
-    views_include('view');
-
-    // Create the basic view.
-    $view = new view();
-    $view->vid = 'test_view';
-    $view->base_table = 'views_test';
-
-    // Set up the fields we need.
-    $display = $view->new_display('default', 'Master', 'default');
-
-    $display->override_option('fields', array(
-      'id' => array(
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'id' => 'name',
-        'table' => 'views_test',
-        'field' => 'name',
-        'relationship' => 'none',
-      ),
-      'age' => array(
-        'id' => 'age',
-        'table' => 'views_test',
-        'field' => 'age',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the sort order.
-    $display->override_option('sorts', array(
-      'id' => array(
-        'order' => 'ASC',
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the pager.
-    $display->override_option('pager', array(
-      'type' => 'none',
-      'options' => array('offset' => 0),
-    ));
-
-    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
-    $display->override_option('style_plugin', 'views_data_export_txt');
-    $display->override_option('path', 'vde_test');
-
-
-    return $view;
+    return array(&$view, $expected);
   }
 
-}
\ No newline at end of file
+}
diff --git a/tests/xls_export.test b/tests/xls_export.test
index 9d74667..4146030 100644
--- a/tests/xls_export.test
+++ b/tests/xls_export.test
@@ -1,6 +1,6 @@
 <?php
 
-class XLSExportViewsDataExportTests extends ViewsDataExportBaseTest {
+class XLSExportViewsDataExportTests extends ViewsDataExportSimpleExportTest {
 
   protected $profile = 'testing';
 
@@ -12,10 +12,16 @@ class XLSExportViewsDataExportTests extends ViewsDataExportBaseTest {
     );
   }
 
-  public function testNonBatchedExport() {
-    $view = $this->getXLSExportView();
+  protected $vde_export_type = 'XLS';
+
+  protected function getExportView($path = 'vde_test') {
+    // Create the basic view.
+    $view = $this->getBasicExportView();
+
+    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
+    $display->override_option('style_plugin', 'views_data_export_xls');
+    $display->override_option('path', $path);
 
-    $result = $view->execute_display('vde_test');
     $expected = '<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -32,69 +38,7 @@ class XLSExportViewsDataExportTests extends ViewsDataExportBaseTest {
   </body>
 </html>';
 
-    $this->assertExportEqual($result, $expected, 'Non batched XLS export matched expected output.');
-  }
-
-  /**
-   * Build and return a basic view of the views_test table.
-   *
-   * @return view
-   */
-  protected function getXLSExportView() {
-    views_include('view');
-
-    // Create the basic view.
-    $view = new view();
-    $view->vid = 'test_view';
-    $view->base_table = 'views_test';
-
-    // Set up the fields we need.
-    $display = $view->new_display('default', 'Master', 'default');
-
-    $display->override_option('fields', array(
-      'id' => array(
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'id' => 'name',
-        'table' => 'views_test',
-        'field' => 'name',
-        'relationship' => 'none',
-      ),
-      'age' => array(
-        'id' => 'age',
-        'table' => 'views_test',
-        'field' => 'age',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the sort order.
-    $display->override_option('sorts', array(
-      'id' => array(
-        'order' => 'ASC',
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the pager.
-    $display->override_option('pager', array(
-      'type' => 'none',
-      'options' => array('offset' => 0),
-    ));
-
-    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
-    $display->override_option('style_plugin', 'views_data_export_xls');
-    $display->override_option('path', 'vde_test');
-
-
-    return $view;
+    return array(&$view, $expected);
   }
 
-}
\ No newline at end of file
+}
diff --git a/tests/xml_export.test b/tests/xml_export.test
index d269930..a1dc350 100644
--- a/tests/xml_export.test
+++ b/tests/xml_export.test
@@ -1,6 +1,6 @@
 <?php
 
-class XMLExportViewsDataExportTests extends ViewsDataExportBaseTest {
+class XMLExportViewsDataExportTests extends ViewsDataExportSimpleExportTest {
 
   protected $profile = 'testing';
 
@@ -12,10 +12,16 @@ class XMLExportViewsDataExportTests extends ViewsDataExportBaseTest {
     );
   }
 
-  public function testNonBatchedExport() {
-    $view = $this->getXMLExportView();
+  protected $vde_export_type = 'XML';
+
+  protected function getExportView($path = 'vde_test') {
+    // Create the basic view.
+    $view = $this->getBasicExportView();
+
+    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
+    $display->override_option('style_plugin', 'views_data_export_xml');
+    $display->override_option('path', $path);
 
-    $result = $view->execute_display('vde_test');
     $expected = '<?xml version="1.0" encoding="UTF-8" ?>
 <views_tests>
   <views_test>
@@ -45,69 +51,7 @@ class XMLExportViewsDataExportTests extends ViewsDataExportBaseTest {
   </views_test>
 </views_tests>';
 
-    $this->assertExportEqual($result, $expected, 'Non batched XML export matched expected output.');
-  }
-
-  /**
-   * Build and return a basic view of the views_test table.
-   *
-   * @return view
-   */
-  protected function getXMLExportView() {
-    views_include('view');
-
-    // Create the basic view.
-    $view = new view();
-    $view->vid = 'test_view';
-    $view->base_table = 'views_test';
-
-    // Set up the fields we need.
-    $display = $view->new_display('default', 'Master', 'default');
-
-    $display->override_option('fields', array(
-      'id' => array(
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'id' => 'name',
-        'table' => 'views_test',
-        'field' => 'name',
-        'relationship' => 'none',
-      ),
-      'age' => array(
-        'id' => 'age',
-        'table' => 'views_test',
-        'field' => 'age',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the sort order.
-    $display->override_option('sorts', array(
-      'id' => array(
-        'order' => 'ASC',
-        'id' => 'id',
-        'table' => 'views_test',
-        'field' => 'id',
-        'relationship' => 'none',
-      ),
-    ));
-
-    // Set up the pager.
-    $display->override_option('pager', array(
-      'type' => 'none',
-      'options' => array('offset' => 0),
-    ));
-
-    $display = $view->new_display('views_data_export', 'Data export', 'vde_test');
-    $display->override_option('style_plugin', 'views_data_export_xml');
-    $display->override_option('path', 'vde_test');
-
-
-    return $view;
+    return array(&$view, $expected);
   }
 
-}
\ No newline at end of file
+}
diff --git a/theme/views_data_export.theme.inc b/theme/views_data_export.theme.inc
index b26e8cd..057da8f 100644
--- a/theme/views_data_export.theme.inc
+++ b/theme/views_data_export.theme.inc
@@ -58,7 +58,7 @@ function theme_views_data_export_feed_icon($variables) {
 function theme_views_data_export_complete_page($variables) {
   extract($variables, EXTR_SKIP);
   drupal_set_title(t('Data export successful'));
-  drupal_add_html_head(array('#tag' => 'meta', '#attributes' => array('http-equiv' =>"refresh", 'content' => '3;url='. $file)), 'views_data_export_download');
+  drupal_add_html_head(array('#tag' => 'meta', '#attributes' => array('http-equiv' =>"Refresh", 'content' => '3;url='. $file)), 'views_data_export_download');
   $output = '';
   $output .= '<p>';
   $output .= t('Your export has been created. View/download the file <a href="@link">here</a> (will automatically download in 3 seconds.)', array('@link' => $file));
@@ -119,7 +119,7 @@ function template_preprocess_views_data_export_csv_header(&$vars) {
             break;
         }
       }
-      
+
     $vars['header'][$key] = $wrap . str_replace('"', $replace_value, $output) . $wrap;
   }
 }
