diff --git a/tempest/tests/compute/test_volumes_get.py b/tempest/tests/compute/test_volumes_get.py
index cda943d..fcdec96 100644
--- a/tempest/tests/compute/test_volumes_get.py
+++ b/tempest/tests/compute/test_volumes_get.py
@@ -18,21 +18,16 @@
 from nose.plugins.attrib import attr
 
 from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
 
 
-class VolumesGetTest(BaseComputeTest):
-
-    @classmethod
-    def setUpClass(cls):
-        super(VolumesGetTest, cls).setUpClass()
-        cls.client = cls.volumes_extensions_client
+class VolumesGetTestBase(object):
 
     @attr(type='smoke')
     def test_volume_create_get_delete(self):
         """CREATE, GET, DELETE Volume"""
         try:
-            v_name = rand_name('Volume-')
+            v_name = rand_name('Volume-%s-') % self._interface
             metadata = {'Type': 'work'}
             #Create volume
             resp, volume = self.client.create_volume(size=1,
@@ -93,3 +88,21 @@
             #Delete the Volume created in this method
             resp, _ = self.client.delete_volume(volume['id'])
             self.assertEqual(202, resp.status)
+            #Checking if the deleted Volume still exists
+            self.client.wait_for_resource_deletion(volume['id'])
+
+
+class VolumesGetTestXML(base.BaseComputeTestXML, VolumesGetTestBase):
+    @classmethod
+    def setUpClass(cls):
+        cls._interface = "xml"
+        super(VolumesGetTestXML, cls).setUpClass()
+        cls.client = cls.volumes_extensions_client
+
+
+class VolumesGetTestJSON(base.BaseComputeTestJSON, VolumesGetTestBase):
+    @classmethod
+    def setUpClass(cls):
+        cls._interface = "json"
+        super(VolumesGetTestJSON, cls).setUpClass()
+        cls.client = cls.volumes_extensions_client
diff --git a/tempest/tests/compute/test_volumes_list.py b/tempest/tests/compute/test_volumes_list.py
index 679a23b..3f03996 100644
--- a/tempest/tests/compute/test_volumes_list.py
+++ b/tempest/tests/compute/test_volumes_list.py
@@ -18,10 +18,10 @@
 import nose
 
 from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
 
 
-class VolumesListTest(BaseComputeTest):
+class VolumesTestBase(object):
 
     """
     This test creates a number of 1G volumes. To run successfully,
@@ -31,9 +31,40 @@
     VOLUME_BACKING_FILE_SIZE is atleast 4G in your localrc
     """
 
+    def test_volume_list(self):
+        """Should return the list of Volumes"""
+        # Fetch all Volumes
+        resp, fetched_list = self.client.list_volumes()
+        self.assertEqual(200, resp.status)
+        # Now check if all the Volumes created in setup are in fetched list
+        missing_volumes = \
+                [v for v in self.volume_list if v not in fetched_list]
+
+        self.assertFalse(missing_volumes,
+                         "Failed to find volume %s in fetched list"
+                         % ', '.join(m_vol['displayName']
+                                        for m_vol in missing_volumes))
+
+    def test_volume_list_with_details(self):
+        """Should return the list of Volumes with details"""
+        #Fetch all Volumes
+        resp, fetched_list = self.client.list_volumes_with_detail()
+        self.assertEqual(200, resp.status)
+        #Now check if all the Volumes created in setup are in fetched list
+        missing_volumes = \
+                [v for v in self.volume_list if v not in fetched_list]
+
+        self.assertFalse(missing_volumes,
+                         "Failed to find volume %s in fetched list"
+                         % ', '.join(m_vol['displayName']
+                                        for m_vol in missing_volumes))
+
+
+class VolumesTestXML(base.BaseComputeTestXML, VolumesTestBase):
     @classmethod
     def setUpClass(cls):
-        super(VolumesListTest, cls).setUpClass()
+        cls._interface = 'xml'
+        super(VolumesTestXML, cls).setUpClass()
         cls.client = cls.volumes_extensions_client
         # Create 3 Volumes
         cls.volume_list = list()
@@ -41,10 +72,11 @@
         for i in range(3):
             v_name = rand_name('volume')
             metadata = {'Type': 'work'}
+            v_name += cls._interface
             try:
                 resp, volume = cls.client.create_volume(size=1,
-                                                         display_name=v_name,
-                                                         metadata=metadata)
+                                                        display_name=v_name,
+                                                        metadata=metadata)
                 cls.client.wait_for_volume_status(volume['id'],
                                                    'available')
                 resp, volume = cls.client.get_volume(volume['id'])
@@ -71,30 +103,52 @@
         # Delete the created Volumes
         for volume in cls.volume_list:
             resp, _ = cls.client.delete_volume(volume['id'])
-        super(VolumesListTest, cls).tearDownClass()
+            cls.client.wait_for_resource_deletion(volume['id'])
+        super(VolumesTestXML, cls).tearDownClass()
 
-    def test_volume_list(self):
-        """Should return the list of Volumes"""
-        # Fetch all Volumes
-        resp, fetched_list = self.client.list_volumes()
-        self.assertEqual(200, resp.status)
-        # Now check if all the Volumes created in setup are in fetched list
-        missing_volumes =\
-        [v for v in self.volume_list if v not in fetched_list]
-        self.assertFalse(missing_volumes,
-                         "Failed to find volume %s in fetched list"
-                         % ', '.join(m_vol['displayName']
-                                        for m_vol in missing_volumes))
 
-    def test_volume_list_with_details(self):
-        """Should return the list of Volumes with details"""
-        #Fetch all Volumes
-        resp, fetched_list = self.client.list_volumes_with_detail()
-        self.assertEqual(200, resp.status)
-        #Now check if all the Volumes created in setup are in fetched list
-        missing_volumes =\
-        [v for v in self.volume_list if v not in fetched_list]
-        self.assertFalse(missing_volumes,
-                         "Failed to find volume %s in fetched list"
-                         % ', '.join(m_vol['displayName']
-                                        for m_vol in missing_volumes))
+class VolumesTestJSON(base.BaseComputeTestJSON, VolumesTestBase):
+    @classmethod
+    def setUpClass(cls):
+        cls._interface = 'json'
+        super(VolumesTestJSON, cls).setUpClass()
+        cls.client = cls.volumes_extensions_client
+        # Create 3 Volumes
+        cls.volume_list = []
+        cls.volume_id_list = []
+        for i in range(3):
+            v_name = rand_name('volume-%s')
+            metadata = {'Type': 'work'}
+            v_name += cls._interface
+            try:
+                resp, volume = cls.client.create_volume(size=1,
+                                                        display_name=v_name,
+                                                        metadata=metadata)
+                cls.client.wait_for_volume_status(volume['id'],
+                                                   'available')
+                resp, volume = cls.client.get_volume(volume['id'])
+                cls.volume_list.append(volume)
+                cls.volume_id_list.append(volume['id'])
+            except:
+                if cls.volume_list:
+                    # We could not create all the volumes, though we were able
+                    # to create *some* of the volumes. This is typically
+                    # because the backing file size of the volume group is
+                    # too small. So, here, we clean up whatever we did manage
+                    # to create and raise a SkipTest
+                    for volume in cls.volume_list:
+                        cls.client.delete_volume(volume)
+                    msg = ("Failed to create ALL necessary volumes to run "
+                           "test. This typically means that the backing file "
+                           "size of the nova-volumes group is too small to "
+                           "create the 3 volumes needed by this test case")
+                    raise nose.SkipTest(msg)
+                raise
+
+    @classmethod
+    def tearDownClass(cls):
+        # Delete the created Volumes
+        for volume in cls.volume_list:
+            resp, _ = cls.client.delete_volume(volume['id'])
+            cls.client.wait_for_resource_deletion(volume['id'])
+        super(VolumesTestJSON, cls).tearDownClass()
diff --git a/tempest/tests/compute/test_volumes_negative.py b/tempest/tests/compute/test_volumes_negative.py
index ea2811c..5c93f07 100644
--- a/tempest/tests/compute/test_volumes_negative.py
+++ b/tempest/tests/compute/test_volumes_negative.py
@@ -20,15 +20,10 @@
 
 from tempest import exceptions
 from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
 
 
-class VolumesNegativeTest(BaseComputeTest):
-
-    @classmethod
-    def setUpClass(cls):
-        super(VolumesNegativeTest, cls).setUpClass()
-        cls.client = cls.volumes_extensions_client
+class VolumesNegativeTestBase(object):
 
     @attr(type='negative')
     def test_volume_get_nonexistant_volume_id(self):
@@ -140,3 +135,21 @@
         Negative: Should not be able to delete volume when empty ID is passed
         """
         resp, volume = self.client.delete_volume('')
+
+
+class VolumesNegativeTestXML(base.BaseComputeTestXML,
+                                VolumesNegativeTestBase):
+    @classmethod
+    def setUpClass(cls):
+        cls._interface = "xml"
+        super(VolumesNegativeTestXML, cls).setUpClass()
+        cls.client = cls.volumes_extensions_client
+
+
+class VolumesNegativeTestJSON(base.BaseComputeTestJSON,
+                                VolumesNegativeTestBase):
+    @classmethod
+    def setUpClass(cls):
+        cls._interface = "json"
+        super(VolumesNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.volumes_extensions_client
