summaryrefslogtreecommitdiffstats
path: root/dovetail/tests
diff options
context:
space:
mode:
authorLeo Wang <grakiss.wanglei@huawei.com>2016-11-29 04:21:40 -0500
committerLeo Wang <grakiss.wanglei@huawei.com>2016-12-13 02:40:02 -0500
commit1c0f19209637572d0bd50c1a3691bc18ee6fb9ee (patch)
treec8bda462d8ca8e830bb4843e46d48c1aa0a657fd /dovetail/tests
parent0a90987741fe2b0a2cc81c5b8ffef46a8111f250 (diff)
[dovetail tool] support shell scripts for testcase validation
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I45dca6b8dbd888757da163189d261f6e4dba5034 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
Diffstat (limited to 'dovetail/tests')
-rw-r--r--dovetail/tests/unit/test_parser.py7
-rw-r--r--dovetail/tests/unit/test_testcase.yaml3
2 files changed, 7 insertions, 3 deletions
diff --git a/dovetail/tests/unit/test_parser.py b/dovetail/tests/unit/test_parser.py
index 8d32995c..410a6629 100644
--- a/dovetail/tests/unit/test_parser.py
+++ b/dovetail/tests/unit/test_parser.py
@@ -32,7 +32,8 @@ class TestParser(unittest.TestCase):
def test_parser_cmd(self):
"""Test whether the command is correctly parsed."""
- mock_cmd = "python /functest/ci/run_tests.py -t {{script_testcase}} -r"
+ mock_cmd = "python /functest/ci/run_tests.py "\
+ "-t {{validate_testcase}} -r"
with open(os.path.join(self.test_path, 'test_testcase.yaml')) as f:
mock_testcase_yaml = yaml.safe_load(f)
MockTestcase = type('Testcase', (object,), {})
@@ -45,7 +46,8 @@ class TestParser(unittest.TestCase):
def test_parser_cmd_fail(self):
"""Test whether the command is correctly parsed."""
- mock_cmd = "python /functest/ci/run_tests.py -t {{script_testcase}} -r"
+ mock_cmd = "python /functest/ci/run_tests.py "\
+ "-t {{validate_testcase}} -r"
mock_testcase_yaml = {}
MockTestcase = type('Testcase', (object,), {})
mock_testcase = MockTestcase()
@@ -55,5 +57,6 @@ class TestParser(unittest.TestCase):
"None -r")
self.assertEqual(expected_output, output)
+
if __name__ == '__main__':
unittest.main()
diff --git a/dovetail/tests/unit/test_testcase.yaml b/dovetail/tests/unit/test_testcase.yaml
index 1b03262f..735219c5 100644
--- a/dovetail/tests/unit/test_testcase.yaml
+++ b/dovetail/tests/unit/test_testcase.yaml
@@ -1,9 +1,10 @@
dovetail.ipv6.tc001:
name: dovetail.ipv6.tc001
objective: VIM ipv6 operations, to create/delete network, port and subnet in bulk operation
- scripts:
+ validate:
type: functest
testcase: tempest_smoke_serial
+ report:
sub_testcase_list:
- tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_network
- tempest.api.network.test_networks.BulkNetworkOpsIpV7Test.test_bulk_create_delete_port