From 1c0f19209637572d0bd50c1a3691bc18ee6fb9ee Mon Sep 17 00:00:00 2001 From: Leo Wang Date: Tue, 29 Nov 2016 04:21:40 -0500 Subject: [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 --- dovetail/tests/unit/test_parser.py | 7 +++++-- dovetail/tests/unit/test_testcase.yaml | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'dovetail/tests') 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 -- cgit 1.2.3-korg