diff --git a/ironic_tempest_plugin/services/introspection_client.py b/ironic_tempest_plugin/services/introspection_client.py
index cce5213..2934e54 100644
--- a/ironic_tempest_plugin/services/introspection_client.py
+++ b/ironic_tempest_plugin/services/introspection_client.py
@@ -73,3 +73,13 @@
         self.expected_success(202, resp.status)
 
         return resp
+
+    @base.handle_errors
+    def abort_introspection(self, uuid):
+        """Abort introspection for a node."""
+        resp, _body = self.post(url=('/%s/introspection/%s/abort' %
+                                     (self.uri_prefix, uuid)),
+                                body=None)
+        self.expected_success(202, resp.status)
+
+        return resp
diff --git a/ironic_tempest_plugin/tests/manager.py b/ironic_tempest_plugin/tests/manager.py
index 445a15e..961b284 100644
--- a/ironic_tempest_plugin/tests/manager.py
+++ b/ironic_tempest_plugin/tests/manager.py
@@ -121,6 +121,9 @@
     def introspection_start(self, uuid):
         return self.introspection_client.start_introspection(uuid)
 
+    def introspection_abort(self, uuid):
+        return self.introspection_client.abort_introspection(uuid)
+
     def baremetal_flavor(self):
         flavor_id = CONF.compute.flavor_ref
         flavor = self.flavors_client.show_flavor(flavor_id)['flavor']
@@ -210,6 +213,11 @@
         if (self.node_show(node_id)['provision_state'] ==
            BaremetalProvisionStates.AVAILABLE):
             return
+        # in case when introspection failed we need set provision state
+        # to 'manage' to make it possible transit into 'provide' state
+        if self.node_show(node_id)['provision_state'] == 'inspect failed':
+            self.baremetal_client.set_node_provision_state(node_id, 'manage')
+
         try:
             self.baremetal_client.set_node_provision_state(node_id, 'provide')
         except tempest.lib.exceptions.RestClientException:
@@ -222,13 +230,14 @@
             timeout=CONF.baremetal.unprovision_timeout,
             interval=self.wait_provisioning_state_interval)
 
-    def introspect_node(self, node_id):
-        # in case there are properties remove those
-        patch = {('properties/%s' % key): None for key in
-                 self.node_show(node_id)['properties']}
-        # reset any previous rule result
-        patch['extra/rule_success'] = None
-        self.node_update(node_id, patch)
+    def introspect_node(self, node_id, remove_props=True):
+        if remove_props:
+            # in case there are properties remove those
+            patch = {('properties/%s' % key): None for key in
+                     self.node_show(node_id)['properties']}
+            # reset any previous rule result
+            patch['extra/rule_success'] = None
+            self.node_update(node_id, patch)
 
         self.baremetal_client.set_node_provision_state(node_id, 'manage')
         self.baremetal_client.set_node_provision_state(node_id, 'inspect')
diff --git a/ironic_tempest_plugin/tests/test_basic.py b/ironic_tempest_plugin/tests/test_basic.py
index 6ef2266..dd099c0 100644
--- a/ironic_tempest_plugin/tests/test_basic.py
+++ b/ironic_tempest_plugin/tests/test_basic.py
@@ -14,8 +14,7 @@
 from tempest import test  # noqa
 
 from ironic_inspector.test.inspector_tempest_plugin.tests import manager
-from ironic_tempest_plugin.tests.scenario.baremetal_manager import \
-    BaremetalProvisionStates
+from ironic_tempest_plugin.tests.scenario import baremetal_manager
 
 
 class InspectorBasicTest(manager.InspectorScenarioTest):
@@ -46,6 +45,17 @@
         self.assertEqual(expected_cpu_arch,
                          node['properties']['cpu_arch'])
 
+    def verify_introspection_aborted(self, uuid):
+        status = self.introspection_status(uuid)
+
+        self.assertEqual('Canceled by operator', status['error'])
+        self.assertTrue(status['finished'])
+
+        self.wait_provisioning_state(
+            uuid, 'inspect failed',
+            timeout=CONF.baremetal.active_timeout,
+            interval=self.wait_provisioning_state_interval)
+
     @test.idempotent_id('03bf7990-bee0-4dd7-bf74-b97ad7b52a4b')
     @test.services('baremetal', 'compute', 'image',
                    'network', 'object_storage')
@@ -91,7 +101,7 @@
 
         for node_id in self.node_ids:
             self.wait_provisioning_state(
-                node_id, BaremetalProvisionStates.AVAILABLE,
+                node_id, baremetal_manager.BaremetalProvisionStates.AVAILABLE,
                 timeout=CONF.baremetal.active_timeout,
                 interval=self.wait_provisioning_state_interval)
 
@@ -100,6 +110,41 @@
         ins, _node = self.boot_instance()
         self.terminate_instance(ins)
 
+    @test.idempotent_id('70ca3070-184b-4b7d-8892-e977d2bc2870')
+    @test.services('baremetal')
+    def test_introspection_abort(self):
+        """This smoke test case follows this very basic set of operations:
+
+            * Start nodes introspection
+            * Wait until nodes power on
+            * Abort introspection
+            * Verifies nodes status and power state
+
+        """
+        # start nodes introspection
+        for node_id in self.node_ids:
+            self.introspect_node(node_id, remove_props=False)
+
+        # wait for nodes power on
+        for node_id in self.node_ids:
+            self.wait_power_state(
+                node_id,
+                baremetal_manager.BaremetalPowerStates.POWER_ON)
+
+        # abort introspection
+        for node_id in self.node_ids:
+            self.introspection_abort(node_id)
+
+        # wait for nodes power off
+        for node_id in self.node_ids:
+            self.wait_power_state(
+                node_id,
+                baremetal_manager.BaremetalPowerStates.POWER_OFF)
+
+        # verify nodes status and provision state
+        for node_id in self.node_ids:
+            self.verify_introspection_aborted(node_id)
+
 
 class InspectorSmokeTest(manager.InspectorScenarioTest):
 
