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