aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/test_cli_runner.py
diff options
context:
space:
mode:
authorkubi <jean.gaoliang@huawei.com>2015-09-15 03:37:14 -0400
committerkubi <jean.gaoliang@huawei.com>2015-09-25 15:32:26 +0800
commit531ac9968cf8703ad7a2c70f45837ce0e81dbec9 (patch)
treeed1a8d5e8bcb1665b49a8521858a1ac6207a5cbf /tests/functional/test_cli_runner.py
parent735af0fc05d73cbc7bd97b52a230d966cbfec6c3 (diff)
Add functional tests in verify and merge
As Ana said ,"The first functional test should be as simple as a "Hello world", it shall be possible to run the "Hello world" test without using OpenStack." so i just finish functional test framework and do functional test for subcommand "runner"and"scenario" without using Openstack. JIRA:YARDSTICK-103 Change-Id: I673ae61f9922536a685d32ae62e5ad5165472f9d Signed-off-by: kubi <jean.gaoliang@huawei.com>
Diffstat (limited to 'tests/functional/test_cli_runner.py')
-rwxr-xr-xtests/functional/test_cli_runner.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/functional/test_cli_runner.py b/tests/functional/test_cli_runner.py
new file mode 100755
index 000000000..195b572c7
--- /dev/null
+++ b/tests/functional/test_cli_runner.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+import unittest
+
+from tests.functional import utils
+
+
+class RunnerTestCase(unittest.TestCase):
+
+ def setUp(self):
+ super(RunnerTestCase, self).setUp()
+ self.yardstick = utils.Yardstick()
+
+ def test_runner_list(self):
+ res = self.yardstick("runner list")
+
+ self.assertIn("Duration", res)
+ self.assertIn("Arithmetic", res)
+ self.assertIn("Iteration", res)
+ self.assertIn("Sequence", res)
+
+ def test_runner_show_Duration(self):
+ res = self.yardstick("runner show Duration")
+ duration = "duration - amount of time" in res
+ self.assertTrue(duration)
+
+ def test_runner_show_Arithmetic(self):
+ res = self.yardstick("runner show Arithmetic")
+ arithmetic = "Run a scenario arithmetically" in res
+ self.assertTrue(arithmetic)
+
+ def test_runner_show_Iteration(self):
+ res = self.yardstick("runner show Iteration")
+ iteration = "iterations - amount of times" in res
+ self.assertTrue(iteration)
+
+ def test_runner_show_Sequence(self):
+ res = self.yardstick("runner show Sequence")
+ sequence = "sequence - list of values which are executed" in res
+ self.assertTrue(sequence)
+