diff --git a/cinder_tempest_plugin/rbac/v3/base.py b/cinder_tempest_plugin/rbac/v3/base.py
index d1a11e5..fe68e97 100644
--- a/cinder_tempest_plugin/rbac/v3/base.py
+++ b/cinder_tempest_plugin/rbac/v3/base.py
@@ -11,11 +11,16 @@
 #    under the License.
 
 from tempest import config
+from tempest.lib.common import api_microversion_fixture
+from tempest.lib.common import api_version_utils
+from tempest import test
 
 CONF = config.CONF
 
 
-class VolumeV3RbacBaseTests(object):
+class VolumeV3RbacBaseTests(
+    api_version_utils.BaseMicroversionTest, test.BaseTestCase
+):
 
     identity_version = 'v3'
 
@@ -28,6 +33,31 @@
                 "skipping RBAC tests. To enable these tests set "
                 "`tempest.conf [enforce_scope] cinder=True`."
             )
+        if not CONF.service_available.cinder:
+            skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        api_version_utils.check_skip_with_microversion(
+            cls.min_microversion, cls.max_microversion,
+            CONF.volume.min_microversion, CONF.volume.max_microversion)
+
+    @classmethod
+    def setup_credentials(cls):
+        cls.set_network_resources()
+        super(VolumeV3RbacBaseTests, cls).setup_credentials()
+
+    def setUp(self):
+        super(VolumeV3RbacBaseTests, self).setUp()
+        self.useFixture(api_microversion_fixture.APIMicroversionFixture(
+            volume_microversion=self.request_microversion))
+
+    @classmethod
+    def resource_setup(cls):
+        super(VolumeV3RbacBaseTests, cls).resource_setup()
+        cls.request_microversion = (
+            api_version_utils.select_request_microversion(
+                cls.min_microversion,
+                CONF.volume.min_microversion))
 
     def do_request(self, method, expected_status=200, client=None, **payload):
         if not client:
diff --git a/cinder_tempest_plugin/rbac/v3/test_capabilities.py b/cinder_tempest_plugin/rbac/v3/test_capabilities.py
index 62f9b58..861cca9 100644
--- a/cinder_tempest_plugin/rbac/v3/test_capabilities.py
+++ b/cinder_tempest_plugin/rbac/v3/test_capabilities.py
@@ -10,17 +10,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import abc
-
+from cinder_tempest_plugin.rbac.v3 import base as rbac_base
 from tempest.lib import decorators
 from tempest.lib import exceptions
 
-from cinder_tempest_plugin.api.volume import base
-from cinder_tempest_plugin.rbac.v3 import base as rbac_base
 
-
-class VolumeV3RbacCapabilityTests(rbac_base.VolumeV3RbacBaseTests,
-                                  metaclass=abc.ABCMeta):
+class VolumeV3RbacCapabilityTests(rbac_base.VolumeV3RbacBaseTests):
 
     @classmethod
     def setup_clients(cls):
@@ -37,51 +32,35 @@
         cls.admin_stats_client = (
             admin_client.volume_scheduler_stats_client_latest)
 
-    @classmethod
-    def setup_credentials(cls):
-        super().setup_credentials()
-        cls.os_primary = getattr(cls, 'os_%s' % cls.credentials[0])
-
-    @abc.abstractmethod
-    def test_get_capabilities(self):
-        """Test volume_extension:capabilities policy.
-
-        This test must check:
-          * whether the persona can fetch capabilities for a host.
-
-        """
-        pass
-
-
-class ProjectAdminTests(VolumeV3RbacCapabilityTests, base.BaseVolumeTest):
-
-    credentials = ['project_admin', 'system_admin']
-
-    @decorators.idempotent_id('1fdbe493-e58f-48bf-bb38-52003eeef8cb')
-    def test_get_capabilities(self):
+    def _get_capabilities(self, expected_status):
         pools = self.admin_stats_client.list_pools()['pools']
         host_name = pools[0]['name']
-        self.do_request('show_backend_capabilities', expected_status=200,
-                        host=host_name)
+        self.do_request(
+            'show_backend_capabilities',
+            expected_status=expected_status,
+            host=host_name
+        )
 
 
-class ProjectMemberTests(ProjectAdminTests, base.BaseVolumeTest):
-
-    credentials = ['project_member', 'project_admin', 'system_admin']
-
-    @decorators.idempotent_id('dbaf51de-fafa-4f55-875f-7537524489ab')
-    def test_get_capabilities(self):
-        pools = self.admin_stats_client.list_pools()['pools']
-        host_name = pools[0]['name']
-        self.do_request('show_backend_capabilities',
-                        expected_status=exceptions.Forbidden,
-                        host=host_name)
-
-
-class ProjectReaderTests(ProjectMemberTests, base.BaseVolumeTest):
-
+class ProjectReaderTests(VolumeV3RbacCapabilityTests):
     credentials = ['project_reader', 'project_admin', 'system_admin']
 
     @decorators.idempotent_id('d16034fc-4204-4ea8-94b3-714de59fdfbf')
     def test_get_capabilities(self):
-        super().test_get_capabilities()
+        self._get_capabilities(expected_status=exceptions.Forbidden)
+
+
+class ProjectMemberTests(VolumeV3RbacCapabilityTests):
+    credentials = ['project_member', 'project_admin', 'system_admin']
+
+    @decorators.idempotent_id('dbaf51de-fafa-4f55-875f-7537524489ab')
+    def test_get_capabilities(self):
+        self._get_capabilities(expected_status=exceptions.Forbidden)
+
+
+class ProjectAdminTests(VolumeV3RbacCapabilityTests):
+    credentials = ['project_admin', 'system_admin']
+
+    @decorators.idempotent_id('1fdbe493-e58f-48bf-bb38-52003eeef8cb')
+    def test_get_capabilities(self):
+        self._get_capabilities(expected_status=200)
