Add custom tempest test. 49/29249/5
authorjose.lausuch <jose.lausuch@ericsson.com>
Wed, 22 Feb 2017 18:20:07 +0000 (19:20 +0100)
committerJose Lausuch <jose.lausuch@ericsson.com>
Sat, 25 Feb 2017 19:28:58 +0000 (19:28 +0000)
Some users need to run a specific list of
tempest test cases. This patch allows them
to do that by running the command:

    functest testcase run tempest_custom

Change-Id: If8e7726b98c3a71398c7abdf80aea79f10653ebf
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
functest/ci/testcases.yaml
functest/opnfv_tests/openstack/tempest/custom_tests/test_list.txt [new file with mode: 0644]
functest/opnfv_tests/openstack/tempest/tempest.py

index 009f9b7..fd86441 100755 (executable)
@@ -397,6 +397,22 @@ tiers:
                 run:
                     module: 'functest.opnfv_tests.openstack.tempest.tempest'
                     class: 'TempestDefcore'
+            -
+                name: tempest_custom
+                criteria: 'success_rate == 100%'
+                blocking: false
+                description: >-
+                    The test case allows running a customized list of tempest
+                    test cases defined in a file under
+                    <dir_functest_repo>/functest/opnfv_tests/openstack/
+                      /tempest/custom_tests/test_list.txt
+                    The file is empty and can be customized with the desired tests.
+                dependencies:
+                    installer: 'unknown'
+                    scenario: 'unknown'
+                run:
+                    module: 'functest.opnfv_tests.openstack.tempest.tempest'
+                    class: 'TempestCustom'
 #            -
 #                name: rally_full
 #                criteria: 'success_rate >= 90%'
diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/test_list.txt b/functest/opnfv_tests/openstack/tempest/custom_tests/test_list.txt
new file mode 100644 (file)
index 0000000..ac4e372
--- /dev/null
@@ -0,0 +1,4 @@
+# This is an empty file to be filled up with the desired tempest test cases
+# Examples:
+#tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
+#tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
\ No newline at end of file
index 37b5c0e..4c96500 100644 (file)
@@ -324,11 +324,11 @@ class TempestMultisite(TempestCommon):
 
 class TempestCustom(TempestCommon):
 
-    def __init__(self, mode, option):
+    def __init__(self):
         TempestCommon.__init__(self)
         self.case_name = "tempest_custom"
-        self.MODE = mode
-        self.OPTION = option
+        self.MODE = "custom"
+        self.OPTION = "--concurrency 1"
 
 
 class TempestDefcore(TempestCommon):