1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 from tests.functional import utils
16 class RunnerTestCase(unittest.TestCase):
19 super(RunnerTestCase, self).setUp()
20 self.yardstick = utils.Yardstick()
22 def test_runner_list(self):
23 res = self.yardstick("runner list")
25 self.assertIn("Duration", res)
26 self.assertIn("Arithmetic", res)
27 self.assertIn("Iteration", res)
28 self.assertIn("Sequence", res)
30 def test_runner_show_Duration(self):
31 res = self.yardstick("runner show Duration")
32 duration = "duration - amount of time" in res
33 self.assertTrue(duration)
35 def test_runner_show_Arithmetic(self):
36 res = self.yardstick("runner show Arithmetic")
37 arithmetic = "Run a scenario arithmetically" in res
38 self.assertTrue(arithmetic)
40 def test_runner_show_Iteration(self):
41 res = self.yardstick("runner show Iteration")
42 iteration = "iterations - amount of times" in res
43 self.assertTrue(iteration)
45 def test_runner_show_Sequence(self):
46 res = self.yardstick("runner show Sequence")
47 sequence = "sequence - list of values which are executed" in res
48 self.assertTrue(sequence)