diff --git a/cinder/tests/tempest/api/volume/test_volume_revert.py b/cinder/tests/tempest/api/volume/test_volume_revert.py
new file mode 100644
index 0000000..b5151c5
--- /dev/null
+++ b/cinder/tests/tempest/api/volume/test_volume_revert.py
@@ -0,0 +1,77 @@
+# Copyright (c) 2017 Huawei.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.volume import base as volume_base
+from tempest.common import waiters
+from tempest import config
+from tempest.lib import decorators
+
+from cinder.tests.tempest import cinder_clients
+
+CONF = config.CONF
+
+
+class VolumeRevertTests(volume_base.BaseVolumeTest):
+    min_microversion = '3.40'
+
+    @classmethod
+    def setup_clients(cls):
+        cls._api_version = 3
+        super(VolumeRevertTests, cls).setup_clients()
+
+        manager = cinder_clients.Manager(cls.os_primary)
+        cls.volume_revert_client = manager.volume_revet_client
+
+    def setUp(self):
+        super(VolumeRevertTests, self).setUp()
+        # Create volume
+        self.volume = self.create_volume(size=1)
+        # Create snapshot
+        self.snapshot = self.create_snapshot(self.volume['id'])
+
+    @decorators.idempotent_id('87b7dcb7-4950-4a3a-802c-ece55491846d')
+    def test_volume_revert_to_snapshot(self):
+        """Test revert to snapshot"""
+        # Revert to snapshot
+        self.volume_revert_client.revert_to_snapshot(self.volume,
+                                                     self.snapshot['id'])
+        waiters.wait_for_volume_resource_status(
+            self.volumes_client,
+            self.volume['id'], 'available')
+        waiters.wait_for_volume_resource_status(
+            self.snapshots_client,
+            self.snapshot['id'], 'available')
+        volume = self.volumes_client.show_volume(self.volume['id'])['volume']
+
+        self.assertEqual(1, volume['size'])
+
+    @decorators.idempotent_id('4e8b0788-87fe-430d-be7a-444d7f8e0347')
+    def test_volume_revert_to_snapshot_after_extended(self):
+        """Test revert to snapshot after extended"""
+        # Extend the volume
+        self.volumes_client.extend_volume(self.volume['id'], new_size=2)
+        waiters.wait_for_volume_resource_status(self.volumes_client,
+                                                self.volume['id'], 'available')
+        # Revert to snapshot
+        self.volume_revert_client.revert_to_snapshot(self.volume,
+                                                     self.snapshot['id'])
+        waiters.wait_for_volume_resource_status(
+            self.volumes_client,
+            self.volume['id'], 'available')
+        waiters.wait_for_volume_resource_status(
+            self.snapshots_client,
+            self.snapshot['id'], 'available')
+        volume = self.volumes_client.show_volume(self.volume['id'])['volume']
+        self.assertEqual(2, volume['size'])
diff --git a/cinder/tests/tempest/cinder_clients.py b/cinder/tests/tempest/cinder_clients.py
index 8f829ef..aad32d4 100644
--- a/cinder/tests/tempest/cinder_clients.py
+++ b/cinder/tests/tempest/cinder_clients.py
@@ -16,6 +16,7 @@
 from tempest import config
 
 from cinder.tests.tempest.services import consistencygroups_client
+from cinder.tests.tempest.services import volume_revert_client
 
 CONF = config.CONF
 
@@ -35,3 +36,5 @@
         self.consistencygroups_adm_client = (
             consistencygroups_client.ConsistencyGroupsClient(auth_provider,
                                                              **params))
+        self.volume_revet_client = (
+            volume_revert_client.VolumeRevertClient(auth_provider, **params))
diff --git a/cinder/tests/tempest/services/volume_revert_client.py b/cinder/tests/tempest/services/volume_revert_client.py
new file mode 100644
index 0000000..285494a
--- /dev/null
+++ b/cinder/tests/tempest/services/volume_revert_client.py
@@ -0,0 +1,34 @@
+# Copyright (C) 2017 Huawei.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslo_serialization import jsonutils as json
+from tempest.lib.common import rest_client
+from tempest.lib.services.volume.v3 import base_client
+
+
+class VolumeRevertClient(base_client.BaseClient):
+    """Client class to send revert to snapshot action API request"""
+
+    def __init__(self, auth_provider, service, region, **kwargs):
+        super(VolumeRevertClient, self).__init__(
+            auth_provider, service, region, **kwargs)
+
+    def revert_to_snapshot(self, volume, snapshot_id):
+        """Revert a volume to snapshot."""
+        post_body = {'snapshot_id': snapshot_id}
+        post_body = json.dumps({'revert': post_body})
+        resp, body = self.post('volumes/%s/action' % volume['id'],
+                               post_body)
+        return rest_client.ResponseBody(resp, body)
