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 ScenarioTestCase(unittest.TestCase):
20 super(ScenarioTestCase, self).setUp()
21 self.yardstick = utils.Yardstick()
23 def test_scenario_list(self):
24 res = self.yardstick("scenario list")
26 self.assertIn("Lmbench", res)
27 self.assertIn("Perf", res)
28 self.assertIn("Fio", res)
29 self.assertIn("Ping", res)
30 self.assertIn("Iperf3", res)
31 self.assertIn("Pktgen", res)
33 def test_scenario_show_Lmbench(self):
34 res = self.yardstick("scenario show Lmbench")
35 self.assertIn("Execute lmbench memory read latency or memory "
36 "bandwidth benchmark in a hos", res)
38 def test_scenario_show_Perf(self):
39 res = self.yardstick("scenario show Perf")
40 self.assertIn("Execute perf benchmark in a host", res)
42 def test_scenario_show_Fio(self):
43 res = self.yardstick("scenario show Fio")
44 self.assertIn("Execute fio benchmark in a host", res)
46 def test_scenario_show_Ping(self):
47 res = self.yardstick("scenario show Ping")
48 self.assertIn("Execute ping between two hosts", res)
50 def test_scenario_show_Iperf3(self):
51 res = self.yardstick("scenario show Iperf3")
52 self.assertIn("Execute iperf3 between two hosts", res)
54 def test_scenario_show_Pktgen(self):
55 res = self.yardstick("scenario show Pktgen")
56 self.assertIn("Execute pktgen between two hosts", res)