diff --git a/tests/functional/ServicesArgumentsTests.test b/tests/functional/ServicesArgumentsTests.test
index 2efe157..4f1bcca 100644
--- a/tests/functional/ServicesArgumentsTests.test
+++ b/tests/functional/ServicesArgumentsTests.test
@@ -22,7 +22,7 @@ class ServicesArgumentsTestCase extends ServicesWebtestCase {
   public function setUp() {
     parent::setUp('ctools', 'services', 'services_test_resource');
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('services_arguments_test'));
   }
 
   /**
@@ -44,102 +44,4 @@ class ServicesArgumentsTestCase extends ServicesWebtestCase {
     $this->assertEqual($result['status'], 'HTTP/1.1 404 Not found: Could not find the controller.', 'Error triggered when required argument is missing.', 'Arguments');
   }
 
-  public function saveNewEndpoint() {
-    $edit = $this->populateEndpointFAPI() ;
-    $endpoint = new stdClass;
-    $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
-    $endpoint->api_version = 3;
-    $endpoint->name = $edit['name'];
-    $endpoint->title = $edit['title'];
-    $endpoint->server = $edit['server'];
-    $endpoint->path = $edit['path'];
-    $endpoint->authentication = array(
-      'services' => 'services',
-    );
-    $endpoint->server_settings = array(
-      'formatters' => array(
-        'json' => TRUE,
-        'bencode' => TRUE,
-        'rss' => TRUE,
-        'plist' => TRUE,
-        'xmlplist' => TRUE,
-        'php' => TRUE,
-        'yaml' => TRUE,
-        'jsonp' => FALSE,
-        'xml' => FALSE,
-      ),
-      'parsers' => array(
-        'application/x-yaml' => TRUE,
-        'application/json' => TRUE,
-        'application/vnd.php.serialized' => TRUE,
-        'application/plist' => TRUE,
-        'application/plist+xml' => TRUE,
-        'application/x-www-form-urlencoded' => TRUE,
-      ),
-    );
-    $endpoint->resources = array(
-      'system' => array(
-        'alias' => '',
-        'actions' => array(
-          'connect' => array(
-            'enabled' => 1,
-          ),
-          'get_variable' => array(
-            'enabled' => 1,
-          ),
-          'set_variable' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'user' => array(
-        'alias' => '',
-        'operations' => array(
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'login' => array(
-            'enabled' => 1,
-          ),
-          'logout' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'services_arguments_test' => array(
-        'alias' => '',
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-    );
-    $endpoint->debug = 1;
-    $endpoint->export_type = FALSE;
-    services_endpoint_save($endpoint);
-    $endpoint = services_endpoint_load($endpoint->name);
-    $this->assertTrue($endpoint->name == $edit['name'], 'Endpoint successfully created');
-    return $endpoint;
-  }
-
 }
diff --git a/tests/functional/ServicesResourceCommentTests.test b/tests/functional/ServicesResourceCommentTests.test
index b1d0257..392813b 100644
--- a/tests/functional/ServicesResourceCommentTests.test
+++ b/tests/functional/ServicesResourceCommentTests.test
@@ -26,7 +26,7 @@ class ServicesResourceCommentTests extends ServicesWebTestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
 
     // Create and log in our privileged user.
     $this->privileged_user = $this->drupalCreateUser();
diff --git a/tests/functional/ServicesResourceDisabledTests.test b/tests/functional/ServicesResourceDisabledTests.test
index 19c50b1..9e580cf 100644
--- a/tests/functional/ServicesResourceDisabledTests.test
+++ b/tests/functional/ServicesResourceDisabledTests.test
@@ -33,17 +33,19 @@ class ServicesResourceDisabledTest extends ServicesWebTestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
     // Set up privileged user and login.
     $this->privileged_user = $this->drupalCreateUser(array('get a system variable', 'set a system variable'));
     $this->drupalLogin($this->privileged_user);
   }
 
   /**
-   * Save a new endpoint without any resources enabled. This is a method from
-   * ServicesWebTestCase that has been modified.
+   * Save a new endpoint without any resources enabled.
+   *
+   * We override the parent method ServicesWebTestCase to save with no resources
+   * at all.
    */
-  public function saveNewEndpoint() {
+  public function saveNewEndpoint($resources = array()) {
     $edit = $this->populateEndpointFAPI() ;
     $endpoint = new stdClass;
     $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
diff --git a/tests/functional/ServicesResourceFileTests.test b/tests/functional/ServicesResourceFileTests.test
index 7b13b14..ee0c496 100644
--- a/tests/functional/ServicesResourceFileTests.test
+++ b/tests/functional/ServicesResourceFileTests.test
@@ -27,7 +27,7 @@ class ServicesResourceFileTests extends ServicesWebTestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
     // Create and log in our privileged user.
     $this->privileged_user = $this->drupalCreateUser(array(
       'get any binary files',
diff --git a/tests/functional/ServicesResourceNodeTests.test b/tests/functional/ServicesResourceNodeTests.test
index c22e187..956efd0 100644
--- a/tests/functional/ServicesResourceNodeTests.test
+++ b/tests/functional/ServicesResourceNodeTests.test
@@ -31,7 +31,7 @@ class ServicesResourceNodetests extends ServicesWebTestCase {
       'comment'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
   }
 
   /**
@@ -544,7 +544,7 @@ class ServicesResourceNodeTaxonomytests extends ServicesWebTestCase {
     );
     field_create_instance($this->instance);
 
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
   }
 
   /**
diff --git a/tests/functional/ServicesResourceSystemTests.test b/tests/functional/ServicesResourceSystemTests.test
index 92388d7..c24c648 100644
--- a/tests/functional/ServicesResourceSystemTests.test
+++ b/tests/functional/ServicesResourceSystemTests.test
@@ -27,7 +27,7 @@ class ServicesResourceSystemTests extends ServicesWebtestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
     // Set up privileged user and login.
     $this->privileged_user = $this->drupalCreateUser(array('get a system variable', 'set a system variable'));
     $this->drupalLogin($this->privileged_user);
diff --git a/tests/functional/ServicesResourceTaxonomyTests.test b/tests/functional/ServicesResourceTaxonomyTests.test
index 0575db1..47d2366 100644
--- a/tests/functional/ServicesResourceTaxonomyTests.test
+++ b/tests/functional/ServicesResourceTaxonomyTests.test
@@ -23,7 +23,7 @@ class ServicesResourceTaxonomyTests extends ServicesWebtestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
     // Set up privileged user and login.
     $this->privileged_user = $this->drupalCreateUser(array('administer taxonomy', 'access content'));
     $this->drupalLogin($this->privileged_user);
diff --git a/tests/functional/ServicesResourceUserTests.test b/tests/functional/ServicesResourceUserTests.test
index f04db88..de1cc2e 100644
--- a/tests/functional/ServicesResourceUserTests.test
+++ b/tests/functional/ServicesResourceUserTests.test
@@ -27,7 +27,7 @@ class ServicesResourceUsertests extends ServicesWebtestCase {
       'rest_server'
     );
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('node', 'comment', 'file', 'taxonomy_term', 'taxonomy_vocabulary'));
     // Set up privileged user and login.
     $this->privileged_user = $this->drupalCreateUser(array('administer users', 'access user profiles'));
     $this->drupalLogin($this->privileged_user);
diff --git a/tests/functional/ServicesXMLRPCTests.test b/tests/functional/ServicesXMLRPCTests.test
index 2247974..34dfb78 100644
--- a/tests/functional/ServicesXMLRPCTests.test
+++ b/tests/functional/ServicesXMLRPCTests.test
@@ -22,7 +22,7 @@ class ServicesXMLRPCTestCase extends DrupalWebTestCase {
   public function setUp() {
     parent::setUp('ctools', 'services', 'xmlrpc_server', 'services_test_resource');
     // Set up endpoint.
-    $this->endpoint =  $this->saveNewEndpoint();
+    $this->endpoint =  $this->saveNewEndpoint(array('services_test'));
   }
 
   /**
@@ -75,104 +75,6 @@ class ServicesXMLRPCTestCase extends DrupalWebTestCase {
       'XMLRPC precedence works properly (CRUD higher priority than action).', 'XMLRPC: Precedence');
   }
 
-  public function saveNewEndpoint() {
-    $edit = $this->populateEndpointFAPI() ;
-    $endpoint = new stdClass;
-    $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
-    $endpoint->api_version = 3;
-    $endpoint->name = $edit['name'];
-    $endpoint->title = $edit['title'];
-    $endpoint->server = $edit['server'];
-    $endpoint->path = $edit['path'];
-    $endpoint->authentication = array(
-      'services' => 'services',
-    );
-    $endpoint->server_settings = array(
-      'formatters' => array(
-        'json' => TRUE,
-        'bencode' => TRUE,
-        'rss' => TRUE,
-        'plist' => TRUE,
-        'xmlplist' => TRUE,
-        'php' => TRUE,
-        'yaml' => TRUE,
-        'jsonp' => FALSE,
-        'xml' => FALSE,
-      ),
-      'parsers' => array(
-        'application/x-yaml' => TRUE,
-        'application/json' => TRUE,
-        'application/vnd.php.serialized' => TRUE,
-        'application/plist' => TRUE,
-        'application/plist+xml' => TRUE,
-        'application/x-www-form-urlencoded' => TRUE,
-      ),
-    );
-    $endpoint->resources = array(
-      'system' => array(
-        'alias' => '',
-        'actions' => array(
-          'connect' => array(
-            'enabled' => 1,
-          ),
-          'get_variable' => array(
-            'enabled' => 1,
-          ),
-          'set_variable' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'user' => array(
-        'alias' => '',
-        'operations' => array(
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'login' => array(
-            'enabled' => 1,
-          ),
-          'logout' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'services_test' => array(
-        'alias' => '',
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-    );
-    $endpoint->debug = 1;
-    $endpoint->export_type = FALSE;
-    services_endpoint_save($endpoint);
-    $endpoint = services_endpoint_load($endpoint->name);
-    $this->assertTrue($endpoint->name == $edit['name'], 'Endpoint successfully created');
-    return $endpoint;
-  }
-
   /**
    * Do XMLRPC call.
    *
diff --git a/tests/services.test b/tests/services.test
index bafafdb..3dce74c 100644
--- a/tests/services.test
+++ b/tests/services.test
@@ -291,7 +291,14 @@ class ServicesWebTestCase extends DrupalWebTestCase {
     );
   }
 
-  public function saveNewEndpoint() {
+  /**
+   * Save a new endpoint with default settings.
+   *
+   * @param $resources
+   *  An array of names of resource groups to enable, eg 'node'. The resources
+   *  for 'system' and 'user' are always enabled in addition.
+   */
+  public function saveNewEndpoint($resources = array()) {
     $edit = $this->populateEndpointFAPI() ;
     $endpoint = new stdClass;
     $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
@@ -324,187 +331,31 @@ class ServicesWebTestCase extends DrupalWebTestCase {
         'multipart/form-data' => TRUE,
       ),
     );
-    $endpoint->resources = array(
-      'comment' => array(
-        'operations' => array(
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'countAll' => array(
-            'enabled' => 1,
-          ),
-          'countNew' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'file' => array(
-        'operations' => array(
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'create_raw' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'node' => array(
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'relationships' => array(
-          'files' => array(
-            'enabled' => 1,
-          ),
-          'comments' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'targeted_actions' => array(
-          'attach_file' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'system' => array(
-        'actions' => array(
-          'connect' => array(
-            'enabled' => 1,
-          ),
-          'get_variable' => array(
-            'enabled' => 1,
-          ),
-          'set_variable' => array(
-            'enabled' => 1,
-          ),
-          'del_variable' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'taxonomy_term' => array(
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'selectNodes' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'taxonomy_vocabulary' => array(
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'getTree' => array(
-            'enabled' => 1,
-          ),
-        ),
-      ),
-      'user' => array(
-        'operations' => array(
-          'retrieve' => array(
-            'enabled' => 1,
-          ),
-          'create' => array(
-            'enabled' => 1,
-          ),
-          'update' => array(
-            'enabled' => 1,
-          ),
-          'delete' => array(
-            'enabled' => 1,
-          ),
-          'index' => array(
-            'enabled' => 1,
-          ),
-        ),
-        'actions' => array(
-          'login' => array(
-            'enabled' => 1,
-          ),
-          'logout' => array(
-            'enabled' => '1',
-            'settings' => array(
-              'services' => array(
-                'resource_api_version' => '1.1',
-              ),
-            ),
-          ),
-          'register' => array(
+
+    // Add the resources we always need.
+    $resources[] = 'system';
+    $resources[] = 'user';
+
+    // Get all defined resources to fill in the requested resource types.
+    $defined_resources = services_get_resources();
+
+    $endpoint->resources = array();
+    foreach ($resources as $resource_name) {
+      $endpoint->resources[$resource_name] = array();
+
+      // Now work through the operations / actions / etc for each resource.
+      foreach ($defined_resources[$resource_name] as $service_type => $service_info) {
+        $endpoint->resources[$resource_name][$service_type] = array();
+
+        // Add the arrays that enable each service.
+        foreach (array_keys($service_info) as $service_name) {
+          $endpoint->resources[$resource_name][$service_type][$service_name] = array(
             'enabled' => 1,
-          ),
-        ),
-      ),
-    );
+          );
+        }
+      }
+    }
+
     $endpoint->debug = 1;
     $endpoint->export_type = FALSE;
     services_endpoint_save($endpoint);
