From a93e6905958622b6aa656361c0121da378987cb8 Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 13:24:57 +0530 Subject: [PATCH 1/6] changed the function names in unique Signed-off-by: saurabh --- .../wpa2_security/__init__.py | 0 .../wpa2_security/test_bridge_mode.py | 107 +++++++++++++++++ .../wpa2_security/test_nat_mode.py | 106 +++++++++++++++++ .../wpa2_security/test_vlan_mode.py | 112 ++++++++++++++++++ 4 files changed, 325 insertions(+) create mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/__init__.py create mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py create mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py create mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/__init__.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py new file mode 100644 index 000000000..84d8a5edf --- /dev/null +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py @@ -0,0 +1,107 @@ +""" + + Performance Test: Dataplane Throughput Test: BRIDGE Mode + pytest -m "dataplane_throughput_test and BRIDGE" + +""" +import os +import pytest +import allure + +pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, + pytest.mark.bridge] # , pytest.mark.usefixtures("setup_test_run")] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + + +@allure.suite("performance") +@allure.feature("BRIDGE MODE Dataplane Throughput Test") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestDataplaneThroughputBRIDGE(object): + """Dataplane THroughput BRIDGE Mode + pytest -m "dataplane_throughput_test and BRIDGE" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") + @pytest.mark.wpa2_personal + @pytest.mark.twog + def test_tcp_upd_wpa2_personal_bridge_2g_band(self, get_vif_state, lf_tools, + lf_test, station_names_twog, create_lanforge_chamberview_dut, + get_configuration): + """Dataplane THroughput BRIDGE Mode + pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + vlan = 1 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_twog, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") + lf_test.Client_disconnect(station_name=station_names_twog) + assert station + else: + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + def test_tcp_upd_wpa2_personal_bridge_5g_band(self, get_vif_state, lf_tools, + lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + """Dataplane THroughput BRIDGE Mode + pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_fiveg, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") + print("Test Completed... Cleaning up Stations") + lf_test.Client_disconnect(station_name=station_names_fiveg) + assert station + else: + assert False diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py new file mode 100644 index 000000000..a434fe83e --- /dev/null +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py @@ -0,0 +1,106 @@ +""" + + Performance Test: Dataplane Throughput Test: nat Mode + pytest -m "dataplane_throughput_test and nat" + +""" +import os +import pytest +import allure + +pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, + pytest.mark.nat] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + + +@allure.suite("performance") +@allure.feature("BRIDGE MODE Dataplane Throughput Test") +@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestDataplaneThroughputNAT(object): + """Dataplane THroughput nat Mode + pytest -m "dataplane_throughput_test and nat" + """ + + @pytest.mark.wpa2_personal + @pytest.mark.twog + def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, + lf_test, station_names_twog, create_lanforge_chamberview_dut, + get_configuration): + """Dataplane THroughput nat Mode + pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "twog" + vlan = 1 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_twog, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_2G_NAT", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") + lf_test.Client_disconnect(station_name=station_names_twog) + assert station + else: + assert False + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, + lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + """Dataplane THroughput nat Mode + pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "fiveg" + vlan = 1 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_fiveg, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_5G_NAT", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") + print("Test Completed... Cleaning up Stations") + lf_test.Client_disconnect(station_name=station_names_fiveg) + assert station + else: + assert False diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py new file mode 100644 index 000000000..5339ca9fc --- /dev/null +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py @@ -0,0 +1,112 @@ +""" + + Performance Test: Dataplane Throughput Test: VLAN Mode + pytest -m "dataplane_throughput_test and VLAN" + +""" +import os +import pytest +import allure + +pytestmark = [pytest.mark.performance, + pytest.mark.vlan] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + "rf": {}, + "radius": False +} + + +@allure.suite("performance") +@allure.feature("VLAN MODE Dataplane Throughput Test") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.parametrize( + 'create_vlan', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("create_vlan") +class TestDataplaneThroughputVLAN(object): + """Dataplane THroughput VLAN Mode + pytest -m "dataplane_throughput_test and VLAN" + """ + + @pytest.mark.wpa2_personal + @pytest.mark.twog + def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, + lf_test, station_names_twog, create_lanforge_chamberview_dut, + get_configuration): + """Dataplane THroughput VLAN Mode + pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + vlan = 100 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_twog, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_2G_VLAN", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") + lf_test.Client_disconnect(station_name=station_names_twog) + assert station + else: + assert False + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, + lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + """Dataplane THroughput VLAN Mode + pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + vlan = 100 + dut_name = create_lanforge_chamberview_dut + if ssid_name not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + station = lf_test.Client_Connect(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + station_name=station_names_fiveg, vlan_id=vlan) + + if station: + dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, + instance_name="TIP_DPT_DPT_WPA2_5G_VLAN", + vlan_id=vlan, dut_name=dut_name) + report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") + print("Test Completed... Cleaning up Stations") + lf_test.Client_disconnect(station_name=station_names_fiveg) + assert station + else: + assert False From b428473061a4d11a64a9794c800e039010b72056 Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 13:25:07 +0530 Subject: [PATCH 2/6] changed the function names in unique Signed-off-by: saurabh --- .../wpa2_security/test_nat_mode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py index a434fe83e..619f659cf 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py @@ -36,10 +36,10 @@ class TestDataplaneThroughputNAT(object): """Dataplane THroughput nat Mode pytest -m "dataplane_throughput_test and nat" """ - + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.twog - def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, + def test_tcp_upd_wpa2_personal_nat_2g_band(self, get_vif_state, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Dataplane THroughput nat Mode @@ -71,9 +71,10 @@ class TestDataplaneThroughputNAT(object): else: assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, + def test_tcp_upd_wpa2_personal_nat_5g_band(self, get_vif_state, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Dataplane THroughput nat Mode pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg" From e64ec873ec51c1c0daf423900480cccff6250535 Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 13:25:45 +0530 Subject: [PATCH 3/6] Removed Create Vlan fixture Signed-off-by: saurabh --- .../wpa2_security/test_vlan_mode.py | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py index 5339ca9fc..b522d752b 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py @@ -1,15 +1,14 @@ """ Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and VLAN" + pytest -m "dataplane_throughput_test and vlan" """ import os import pytest import allure -pytestmark = [pytest.mark.performance, - pytest.mark.vlan] +pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -31,25 +30,18 @@ setup_params_general = { scope="class" ) @pytest.mark.usefixtures("setup_profiles") -@pytest.mark.parametrize( - 'create_vlan', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("create_vlan") class TestDataplaneThroughputVLAN(object): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN" + pytest -m "dataplane_throughput_test and vlan" """ - + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.twog - def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, + def test_tcp_upd_wpa2_personal_vlan_2g_band(self, get_vif_state, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and twog" + pytest -m "dataplane_throughput_test and vlan and wpa2_personal and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -77,12 +69,13 @@ class TestDataplaneThroughputVLAN(object): else: assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, + def test_tcp_upd_wpa2_personal_vlan_5g_band(self, get_vif_state, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and fiveg" + pytest -m "dataplane_throughput_test and vlan and wpa2_personal and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] From 7d099d960b8e94f353f47b821bc436b582e93d8f Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 14:55:27 +0530 Subject: [PATCH 4/6] Deleted the file from the git repository --- .../test_bridge_mode.py | 105 ------------------ 1 file changed, 105 deletions(-) delete mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/test_bridge_mode.py diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_bridge_mode.py deleted file mode 100644 index f6a103aec..000000000 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_bridge_mode.py +++ /dev/null @@ -1,105 +0,0 @@ -""" - - Performance Test: Dataplane Throughput Test: BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, - pytest.mark.bridge] # , pytest.mark.usefixtures("setup_test_run")] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, - "rf": {}, - "radius": False -} - - -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestDataplaneThroughputBRIDGE(object): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE" - """ - - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and fiveg" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "fiveg" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False From 6af841c061e5af8e98716d6ac9570138b814870f Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 14:55:39 +0530 Subject: [PATCH 5/6] Deleted the file from the git repository --- .../test_nat_mode.py | 106 ------------------ 1 file changed, 106 deletions(-) delete mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/test_nat_mode.py diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_nat_mode.py deleted file mode 100644 index a434fe83e..000000000 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_nat_mode.py +++ /dev/null @@ -1,106 +0,0 @@ -""" - - Performance Test: Dataplane Throughput Test: nat Mode - pytest -m "dataplane_throughput_test and nat" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, - pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, - "rf": {}, - "radius": False -} - - -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestDataplaneThroughputNAT(object): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat" - """ - - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "NAT" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "NAT" - band = "fiveg" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_5G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False From c8061eaee76d03a4b54f80b28c2baa6cbf8b77d7 Mon Sep 17 00:00:00 2001 From: saurabh Date: Sat, 11 Sep 2021 14:55:46 +0530 Subject: [PATCH 6/6] Deleted the file from the git repository --- .../test_vlan_mode.py | 112 ------------------ 1 file changed, 112 deletions(-) delete mode 100644 tests/e2e/basic/performance_tests/dataplane_throughput_test/test_vlan_mode.py diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_vlan_mode.py deleted file mode 100644 index 5339ca9fc..000000000 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/test_vlan_mode.py +++ /dev/null @@ -1,112 +0,0 @@ -""" - - Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and VLAN" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.performance, - pytest.mark.vlan] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - - -@allure.suite("performance") -@allure.feature("VLAN MODE Dataplane Throughput Test") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.parametrize( - 'create_vlan', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("create_vlan") -class TestDataplaneThroughputVLAN(object): - """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN" - """ - - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_tcp_upd_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "twog" - vlan = 100 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_tcp_upd_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and fiveg" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "fiveg" - vlan = 100 - dut_name = create_lanforge_chamberview_dut - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_5G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False