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 ##############################################################################
11 from __future__ import absolute_import
14 from tests.functional import utils
17 class RunnerTestCase(unittest.TestCase):
20 super(RunnerTestCase, self).setUp()
21 self.yardstick = utils.Yardstick()
23 def test_runner_list(self):
24 res = self.yardstick("runner list")
26 self.assertIn("Duration", res)
27 self.assertIn("Arithmetic", res)
28 self.assertIn("Iteration", res)
29 self.assertIn("Sequence", res)
31 def test_runner_show_Duration(self):
32 res = self.yardstick("runner show Duration")
33 duration = "duration - amount of time" in res
34 self.assertTrue(duration)
36 def test_runner_show_Arithmetic(self):
37 res = self.yardstick("runner show Arithmetic")
38 arithmetic = "Run a scenario arithmetically" in res
39 self.assertTrue(arithmetic)
41 def test_runner_show_Iteration(self):
42 res = self.yardstick("runner show Iteration")
43 iteration = "iterations - amount of times" in res
44 self.assertTrue(iteration)
46 def test_runner_show_Sequence(self):
47 res = self.yardstick("runner show Sequence")
48 sequence = "sequence - list of values which are executed" in res
49 self.assertTrue(sequence)