diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-08-20 20:16:36 +0100 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-10-30 17:37:19 +0000 |
commit | be9bfac604e028e8b93587d1517bc051acf68a31 (patch) | |
tree | 512079fed3a6abdb01054f88d5b5d359f9ea8828 /yardstick/tests | |
parent | d61ecbcda464fa91516f4b3555b00ed7fe67da81 (diff) |
Add RFC2544 iteration status field
Added new RFC2544 iteration status field into the
testcase result to be able to exctract the best
RX/TX throughput value from each iteration.
The field equal "Success" if the trhoughput value is in the
given drop percentage range and "Failure" otherwise.
JIRA: YARDSTICK-1389
Change-Id: I2fb2ef036b63a0e7bbf3d6c6568d3bdffa488e1f
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
(cherry picked from commit 0ff5b131fa3f93f8d47b46c2f13661c5b88d37a1)
Diffstat (limited to 'yardstick/tests')
-rw-r--r-- | yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py | 11 | ||||
-rw-r--r-- | yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py index 0759ecebd..5b39b6cd1 100644 --- a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py +++ b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py @@ -586,7 +586,8 @@ class TestIXIARFC2544Profile(unittest.TestCase): 'Store-Forward_Max_latency_ns': 28} } rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE) - completed, samples = rfc2544_profile.get_drop_percentage(samples, 0, 1) + completed, samples = rfc2544_profile.get_drop_percentage( + samples, 0, 1, 4) self.assertTrue(completed) self.assertEqual(66.9, samples['TxThroughput']) self.assertEqual(66.833, samples['RxThroughput']) @@ -610,7 +611,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE) rfc2544_profile.rate = 1000 completed, samples = rfc2544_profile.get_drop_percentage( - samples, 0, 0.05) + samples, 0, 0.05, 4) self.assertFalse(completed) self.assertEqual(66.9, samples['TxThroughput']) self.assertEqual(66.833, samples['RxThroughput']) @@ -632,7 +633,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE) rfc2544_profile.rate = 1000 completed, samples = rfc2544_profile.get_drop_percentage( - samples, 0.2, 1) + samples, 0.2, 1, 4) self.assertFalse(completed) self.assertEqual(66.9, samples['TxThroughput']) self.assertEqual(66.833, samples['RxThroughput']) @@ -655,7 +656,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE) rfc2544_profile.rate = 1000 completed, samples = rfc2544_profile.get_drop_percentage( - samples, 0.2, 1) + samples, 0.2, 1, 4) self.assertFalse(completed) self.assertEqual(0.0, samples['TxThroughput']) self.assertEqual(66.833, samples['RxThroughput']) @@ -676,7 +677,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): } rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE) completed, samples = rfc2544_profile.get_drop_percentage( - samples, 0, 1, first_run=True) + samples, 0, 1, 4, first_run=True) self.assertTrue(completed) self.assertEqual(66.9, samples['TxThroughput']) self.assertEqual(66.833, samples['RxThroughput']) diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py index 4a1d8c30e..c9d42fb3e 100644 --- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py +++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py @@ -1206,6 +1206,7 @@ class TestRfc2544ResourceHelper(unittest.TestCase): self.assertIsNone(rfc2544_resource_helper._tolerance_high) self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15) self.assertEqual(rfc2544_resource_helper._tolerance_high, 0.15) + self.assertEqual(rfc2544_resource_helper._tolerance_precision, 2) scenario_helper.scenario_cfg = {} # ensure that resource_helper caches self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15) @@ -1240,6 +1241,7 @@ class TestRfc2544ResourceHelper(unittest.TestCase): rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper) self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.2) + self.assertEqual(rfc2544_resource_helper._tolerance_precision, 1) def test_property_tolerance_low_not_range(self): scenario_helper = ScenarioHelper('name1') |