mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-30 18:38:06 +00:00 
			
		
		
		
	Added five test cases for sixg band (#1021)
* Added test cases for sixg band Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Removed unwanted marker Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Added key_mgmt for sixg test cases Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> * Removed unwanted markers Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com> --------- Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
		 Jitendrakumar Kushavah
					Jitendrakumar Kushavah
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							6d72c1a16b
						
					
				
				
					commit
					b597b13596
				
			| @@ -770,3 +770,89 @@ class TestRateLimitingBridge(object): | ||||
|                                             down_rate=down_rate) | ||||
|  | ||||
|         assert True | ||||
|  | ||||
| setup_params_general_sixg = { | ||||
|     "mode": "BRIDGE", | ||||
|     "ssid_modes": { | ||||
|         "wpa3_personal": [ | ||||
|             {"ssid_name": "ssid_wpa2_2g_br", | ||||
|              "appliedRadios": ["2G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 10, | ||||
|                  "egress-rate": 5 | ||||
|              } | ||||
|              }, | ||||
|             {"ssid_name": "ssid_wpa2_6g_br", | ||||
|              "appliedRadios": ["6G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 10, | ||||
|                  "egress-rate": 5 | ||||
|              } | ||||
|              }]}, | ||||
|     "rf": { | ||||
|         "6G": { | ||||
|             "band": "6G", | ||||
|             "channel-mode": "EHT", | ||||
|             "channel-width": 80, | ||||
|         } | ||||
|     }, | ||||
|     "radius": False | ||||
| } | ||||
|  | ||||
| @allure.feature("Rate Limiting Test") | ||||
| @allure.parent_suite("Rate Limiting Tests") | ||||
| @allure.suite("BRIDGE Mode") | ||||
| @allure.sub_suite("WPA3 Personal Security") | ||||
| @pytest.mark.parametrize( | ||||
|     'setup_configuration', | ||||
|     [setup_params_general_sixg], | ||||
|     indirect=True, | ||||
|     scope="class" | ||||
| ) | ||||
| @pytest.mark.usefixtures("setup_configuration") | ||||
| @pytest.mark.wpa3_personal | ||||
| @pytest.mark.twog | ||||
| class TestRateLimitingBridgeSixg(object): | ||||
|  | ||||
|     @pytest.mark.wpa3_personal | ||||
|     @pytest.mark.sixg | ||||
|     @pytest.mark.upload_download | ||||
|     @pytest.mark.batch_size_125 | ||||
|     @pytest.mark.rate_limiting_tests | ||||
|     @pytest.mark.bridge | ||||
|     @allure.testcase(name="WIFI-14364", | ||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-14364") | ||||
|     @allure.title("Test for Upload and Download batch size 1,2,5 6 GHz") | ||||
|     def test_wpa2_personal_ssid_up_dw_batch_size_125_6g(self, get_test_library, get_dut_logs_per_test_case, | ||||
|                                                         get_test_device_logs, num_stations, setup_configuration, | ||||
|                                                         check_connectivity): | ||||
|         """ | ||||
|             To verfiy a client operating with WPA3 Personal security can limit the UP & DW traffic or not. | ||||
|             pytest -m "rate_limiting_tests and wpa3_personal and bridge and ow_sanity_lf and sixg and upload_download and batch_size_125" | ||||
|  | ||||
|         """ | ||||
|         # run wifi capacity test here | ||||
|         profile_data = {"ssid_name": "ssid_wpa2_6g_br", | ||||
|              "appliedRadios": ["6G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 10, | ||||
|                  "egress-rate": 5 | ||||
|              } | ||||
|              } | ||||
|         ssid_name = profile_data["ssid_name"] | ||||
|         mode = "BRIDGE" | ||||
|         passkey = profile_data["security_key"] | ||||
|         up_rate = profile_data["rate-limit"]["ingress-rate"] | ||||
|         down_rate = profile_data["rate-limit"]["egress-rate"] | ||||
|         allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) | ||||
|         get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw", mode=mode, | ||||
|                                             download_rate="1Gbps", batch_size="1,2,5", | ||||
|                                             upload_rate="1Gbps", protocol="UDP", duration="60000", | ||||
|                                             move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, | ||||
|                                             num_stations={"6G": 5}, passkey=passkey, up_rate=up_rate, | ||||
|                                             down_rate=down_rate) | ||||
|  | ||||
|         assert True | ||||
| @@ -1218,3 +1218,158 @@ class TestRateLimitingWithRadiusBridge(object): | ||||
|         #         assert False, f"Expected Throughput should be less than {configured} Mbps" | ||||
|         # else: | ||||
|         #     assert False, "EAP Connect Failed" | ||||
|  | ||||
| setup_params_general_sixg = { | ||||
|     "mode": "BRIDGE", | ||||
|     "ssid_modes": { | ||||
|         "wpa3_enterprise": [ | ||||
|             {"ssid_name": "ssid_wpa2_2g_br", | ||||
|              "appliedRadios": ["2G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 10, | ||||
|                  "egress-rate": 10 | ||||
|              }, | ||||
|              "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, | ||||
|              "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA | ||||
|  | ||||
|              }, | ||||
|             {"ssid_name": "ssid_wpa2_6g_br", | ||||
|              "appliedRadios": ["6G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 5, | ||||
|                  "egress-rate": 5 | ||||
|              }, | ||||
|              "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, | ||||
|              "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA | ||||
|              } | ||||
|         ] | ||||
|     }, | ||||
|     "rf": { | ||||
|         "6G": { | ||||
|             "band": "6G", | ||||
|             "channel-mode": "EHT", | ||||
|             "channel-width": 80, | ||||
|         } | ||||
|     }, | ||||
|     "radius": True | ||||
| } | ||||
|  | ||||
| @allure.feature("Rate Limiting With Radius Test") | ||||
| @allure.parent_suite("Rate Limiting With Radius Test") | ||||
| @allure.suite("BRIDGE Mode") | ||||
| @allure.sub_suite("WPA3 Enterprise Security") | ||||
| @pytest.mark.parametrize( | ||||
|     'setup_configuration', | ||||
|     [setup_params_general_sixg], | ||||
|     indirect=True, | ||||
|     scope="class" | ||||
| ) | ||||
| @pytest.mark.usefixtures("setup_configuration") | ||||
| @pytest.mark.wpa3_enterprise | ||||
| @pytest.mark.twog | ||||
| class TestRateLimitingWithRadiusBridgeSixg(object): | ||||
|  | ||||
|     @pytest.mark.wpa3_enterprise | ||||
|     @pytest.mark.sixg | ||||
|     @pytest.mark.sixg_upload_per_ssid | ||||
|     @allure.title("Test for UDP Upload per SSID 6 GHz") | ||||
|     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-14366", name="WIFI-14366") | ||||
|     def test_radius_server_6g_upload_per_ssid(self, get_test_library, get_dut_logs_per_test_case, | ||||
|                                               get_test_device_logs, | ||||
|                                               get_target_object, | ||||
|                                               num_stations, setup_configuration, rate_radius_info, | ||||
|                                               rate_radius_accounting_info, check_connectivity): | ||||
|         profile_data = {"ssid_name": "ssid_wpa2_6g_br", | ||||
|              "appliedRadios": ["6G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 5, | ||||
|                  "egress-rate": 5 | ||||
|              }} | ||||
|         ssid_name = profile_data["ssid_name"] | ||||
|         mode = "BRIDGE" | ||||
|         security = "wpa3" | ||||
|         band = "sixg" | ||||
|         eap = "TTLS" | ||||
|         ttls_passwd = "password" | ||||
|         identity = "user" | ||||
|         configured = profile_data["rate-limit"]["ingress-rate"] | ||||
|         allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) | ||||
|         get_test_library.pre_cleanup() | ||||
|         passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, | ||||
|                                                                               mode=mode, band=band, eap=eap, | ||||
|                                                                               ttls_passwd=ttls_passwd, ieee80211w=0, | ||||
|                                                                               identity=identity, num_sta=1, | ||||
|                                                                               dut_data=setup_configuration, | ||||
|                                                                               cleanup=False, key_mgmt="WPA-EAP-SHA256") | ||||
|  | ||||
|         if passes != "PASS": | ||||
|             assert passes == "PASS", result | ||||
|         if passes == "PASS": | ||||
|             raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] | ||||
|             obj = get_test_library.wifi_capacity(instance_name="Test_Radius_2g_up_per_ssid", mode=mode, | ||||
|                                                  download_rate="0Gbps", batch_size="1", | ||||
|                                                  upload_rate="1Gbps", protocol="UDP", duration="60000", | ||||
|                                                  move_to_influx=False, dut_data=setup_configuration, | ||||
|                                                  ssid_name=ssid_name, | ||||
|                                                  add_stations=False, raw_lines=raw_lines) | ||||
|             report_name = obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/" | ||||
|             kpi_data = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name) | ||||
|             achieved = float("{:.2f}".format(kpi_data[1][0])) | ||||
|             if achieved <= configured: | ||||
|                 assert True | ||||
|             else: | ||||
|                 assert False, f"Expected Throughput should be less than {configured} Mbps" | ||||
|  | ||||
|     @pytest.mark.wpa3_enterprise | ||||
|     @pytest.mark.sixg | ||||
|     @pytest.mark.sixg_download_perssid_persta | ||||
|     @allure.title("Test for TCP Download per Station 6GHz") | ||||
|     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-14365", name="WIFI-14365") | ||||
|     def test_radius_server_6g_download_persta(self, get_test_library, get_dut_logs_per_test_case, | ||||
|                                                       get_test_device_logs, | ||||
|                                                       get_target_object, | ||||
|                                                       num_stations, setup_configuration, rate_radius_info, | ||||
|                                                       rate_radius_accounting_info, check_connectivity): | ||||
|         profile_data = {"ssid_name": "ssid_wpa2_6g_br", | ||||
|              "appliedRadios": ["6G"], | ||||
|              "security_key": "something", | ||||
|              "rate-limit": { | ||||
|                  "ingress-rate": 5, | ||||
|                  "egress-rate": 5 | ||||
|              }} | ||||
|         ssid_name = profile_data["ssid_name"] | ||||
|         mode = "BRIDGE" | ||||
|         security = "wpa3" | ||||
|         band = "sixg" | ||||
|         eap = "TTLS" | ||||
|         ttls_passwd = "password" | ||||
|         identity = "user" | ||||
|         configured = profile_data["rate-limit"]["egress-rate"] | ||||
|         allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) | ||||
|         get_test_library.pre_cleanup() | ||||
|         passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, | ||||
|                                                                               mode=mode, band=band, eap=eap, | ||||
|                                                                               ttls_passwd=ttls_passwd, ieee80211w=0, | ||||
|                                                                               identity=identity, num_sta=1, | ||||
|                                                                               dut_data=setup_configuration, | ||||
|                                                                               cleanup=False, key_mgmt="WPA-EAP-SHA256") | ||||
|         if passes != "PASS": | ||||
|             assert passes == "PASS", result | ||||
|         if passes == "PASS": | ||||
|             raw_lines = [["dl_rate_sel:  Per-Station Download Rate:"], ["ul_rate_sel:  Per-Station Download Rate:"]] | ||||
|             obj = get_test_library.wifi_capacity(instance_name="Test_Radius_2g_down_perssid_persta", mode=mode, | ||||
|                                                  download_rate="1Gbps", batch_size="1", | ||||
|                                                  upload_rate="0Gbps", protocol="TCP", duration="60000", | ||||
|                                                  move_to_influx=False, dut_data=setup_configuration, | ||||
|                                                  ssid_name=ssid_name, | ||||
|                                                  add_stations=False, raw_lines=raw_lines) | ||||
|             report_name = obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/" | ||||
|             kpi_data = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name) | ||||
|             achieved = float("{:.2f}".format(kpi_data[0][0])) | ||||
|             if achieved <= configured: | ||||
|                 assert True | ||||
|             else: | ||||
|                 assert False, f"Expected Throughput should be less than {configured} Mbps" | ||||
| @@ -0,0 +1,93 @@ | ||||
| """ | ||||
|     Create VLAN ,connect stations and flow traffic through it : vlan Mode | ||||
|     pytest -m multi_vlan_tests | ||||
| """ | ||||
|  | ||||
| import allure | ||||
| import pytest | ||||
|  | ||||
| pytestmark = [pytest.mark.multi_vlan_tests, pytest.mark.sixg] | ||||
|  | ||||
| setup_params_general = { | ||||
|     "mode": "VLAN", | ||||
|     "ssid_modes": { | ||||
|         "wpa3_personal": [ | ||||
|             {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 200}, | ||||
|             {"ssid_name": "ssid_wpa3_p_6g_vlan", "appliedRadios": ["6G"], "security_key": "something", "vlan": 200}], | ||||
|     }, | ||||
|     "rf": { | ||||
|         "6G": { | ||||
|             "band": "6G", | ||||
|             "channel-mode": "EHT", | ||||
|             "channel-width": 80, | ||||
|         } | ||||
|     }, | ||||
|     "radius": False | ||||
| } | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize( | ||||
|     'setup_configuration', | ||||
|     [setup_params_general], | ||||
|     indirect=True, | ||||
|     scope="class" | ||||
| ) | ||||
| @allure.feature("Multi VLAN Test") | ||||
| @allure.parent_suite("Multi VLAN Test") | ||||
| @allure.suite("VLAN Mode") | ||||
| @allure.sub_suite("6Ghz") | ||||
| @pytest.mark.usefixtures("setup_configuration") | ||||
| @pytest.mark.wpa3_personal | ||||
| @pytest.mark.twog | ||||
| class TestMultiVlan(object): | ||||
|  | ||||
|     @pytest.mark.wpa3_personal | ||||
|     @pytest.mark.sixg | ||||
|     @pytest.mark.multi_vlan | ||||
|     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-14358", name="WIFI-14358") | ||||
|     @allure.title("Test VLAN with WPA3 Personal Security Mode") | ||||
|     def test_multi_vlan_wpa3_6g(self, get_test_library, get_dut_logs_per_test_case, | ||||
|                                 get_test_device_logs, num_stations, setup_configuration): | ||||
|         """ | ||||
|                     To verify that a client operating with WPA3(personal) security will connect or not using Multi VLANS | ||||
|             pytest -m "multi_vlan and wpa3_personal and sixg and ow_sanity_lf" | ||||
|         """ | ||||
|         profile_data = {"ssid_name": "ssid_wpa3_p_6g_vlan", "appliedRadios": ["6G"], "security_key": "something", "vlan": 200} | ||||
|         ssid_name = profile_data["ssid_name"] | ||||
|         security_key = profile_data["security_key"] | ||||
|         security = "wpa3" | ||||
|         mode = "VLAN" | ||||
|         band = "sixg" | ||||
|         vlan = [200] | ||||
|  | ||||
|         passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, | ||||
|                                                                    dut_data=setup_configuration, | ||||
|                                                                    passkey=security_key, mode=mode, band=band, | ||||
|                                                                    num_sta=1, vlan_id=vlan) | ||||
|         assert passes == "PASS", result | ||||
|  | ||||
|     @pytest.mark.wpa3_personal | ||||
|     @pytest.mark.sixg | ||||
|     @pytest.mark.disable_vlan_sixg  # wifi-2174 | ||||
|     @allure.testcase(name="WIFI-14361", | ||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-14361") | ||||
|     @allure.title("Test Disabled VLAN with WPA3 Security Mode") | ||||
|     def test_disable_vlan_wpa3_6g(self, get_test_library, get_dut_logs_per_test_case, | ||||
|                                   get_test_device_logs, num_stations, setup_configuration, check_connectivity): | ||||
|         """ | ||||
|             To verify that a client operating with WPA3 security will connect or not by disabling the VLAN | ||||
|             pytest -m "disable_vlan_sixg and wpa3_personal and sixg and ow_sanity_lf" | ||||
|         """ | ||||
|         profile_data = {"ssid_name": "ssid_wpa3_p_6g_vlan", "appliedRadios": ["6G"], "security_key": "something", "vlan": 200} | ||||
|         ssid_name = profile_data["ssid_name"] | ||||
|         security_key = profile_data["security_key"] | ||||
|         security = "wpa3" | ||||
|         mode = "VLAN" | ||||
|         band = "sixg" | ||||
|         vlan = [250] | ||||
|  | ||||
|         passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, | ||||
|                                                                    dut_data=setup_configuration, | ||||
|                                                                    passkey=security_key, mode=mode, band=band, | ||||
|                                                                    num_sta=1, vlan_id=vlan) | ||||
|         assert passes == "FAIL", result | ||||
		Reference in New Issue
	
	Block a user