Merge "Add arguments to the traffic profile render"
[yardstick.git] / yardstick / tests / functional / test_cli_scenario.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
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 ##############################################################################
9
10 import unittest
11
12 from yardstick.tests.functional import utils
13
14
15 class ScenarioTestCase(unittest.TestCase):
16
17     def setUp(self):
18         super(ScenarioTestCase, self).setUp()
19         self.yardstick = utils.Yardstick()
20
21     def test_scenario_list(self):
22         res = self.yardstick("scenario list")
23
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)
30
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)
35
36     def test_scenario_show_Perf(self):
37         res = self.yardstick("scenario show Perf")
38         self.assertIn("Execute perf benchmark in a host", res)
39
40     def test_scenario_show_Fio(self):
41         res = self.yardstick("scenario show Fio")
42         self.assertIn("Execute fio benchmark in a host", res)
43
44     def test_scenario_show_Ping(self):
45         res = self.yardstick("scenario show Ping")
46         self.assertIn("Execute ping between two hosts", res)
47
48     def test_scenario_show_Iperf3(self):
49         res = self.yardstick("scenario show Iperf3")
50         self.assertIn("Execute iperf3 between two hosts", res)
51
52     def test_scenario_show_Pktgen(self):
53         res = self.yardstick("scenario show Pktgen")
54         self.assertIn("Execute pktgen between two hosts", res)