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 ##############################################################################
12 from yardstick.tests.functional import utils
15 class RunnerTestCase(unittest.TestCase):
18 super(RunnerTestCase, self).setUp()
19 self.yardstick = utils.Yardstick()
21 def test_runner_list(self):
22 res = self.yardstick("runner list")
24 self.assertIn("Duration", res)
25 self.assertIn("Arithmetic", res)
26 self.assertIn("Iteration", res)
27 self.assertIn("Sequence", res)
29 def test_runner_show_Duration(self):
30 res = self.yardstick("runner show Duration")
31 duration = "duration - amount of time" in res
32 self.assertTrue(duration)
34 def test_runner_show_Arithmetic(self):
35 res = self.yardstick("runner show Arithmetic")
36 arithmetic = "Run a scenario arithmetically" in res
37 self.assertTrue(arithmetic)
39 def test_runner_show_Iteration(self):
40 res = self.yardstick("runner show Iteration")
41 iteration = "iterations - amount of times" in res
42 self.assertTrue(iteration)
44 def test_runner_show_Sequence(self):
45 res = self.yardstick("runner show Sequence")
46 sequence = "sequence - list of values which are executed" in res
47 self.assertTrue(sequence)