mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-03 20:38:05 +00:00 
			
		
		
		
	Merge branch 'master' into WIFI-6134
This commit is contained in:
		
							
								
								
									
										1
									
								
								.github/workflows/advanced.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/advanced.yml
									
									
									
									
										vendored
									
									
								
							@@ -27,6 +27,7 @@ jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    runs-on: [ self-hosted, small ]
 | 
			
		||||
    needs: [ build ]
 | 
			
		||||
    timeout-minutes: 1440
 | 
			
		||||
    env:
 | 
			
		||||
      AWS_EKS_NAME: tip-wlan-main
 | 
			
		||||
      AWS_DEFAULT_OUTPUT: json
 | 
			
		||||
 
 | 
			
		||||
@@ -249,7 +249,7 @@ class RunTest:
 | 
			
		||||
 | 
			
		||||
    def wifi_capacity(self, mode="BRIDGE", vlan_id=100, batch_size="1,5,10,20,40,64,128",
 | 
			
		||||
                      instance_name="wct_instance", download_rate="1Gbps", influx_tags=[],
 | 
			
		||||
                      upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", raw_lines=[]):
 | 
			
		||||
                      upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", stations="", create_stations=True, raw_lines=[]):
 | 
			
		||||
        instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
 | 
			
		||||
        if mode == "BRIDGE":
 | 
			
		||||
            upstream_port = self.upstream_port
 | 
			
		||||
@@ -276,7 +276,8 @@ class RunTest:
 | 
			
		||||
                                            upload_rate=upload_rate,
 | 
			
		||||
                                            download_rate=download_rate,
 | 
			
		||||
                                            sort="interleave",
 | 
			
		||||
                                            create_stations=True,
 | 
			
		||||
                                            stations=stations,
 | 
			
		||||
                                            create_stations=create_stations,
 | 
			
		||||
                                            radio=None,
 | 
			
		||||
                                            security=None,
 | 
			
		||||
                                            paswd=None,
 | 
			
		||||
 
 | 
			
		||||
@@ -135,6 +135,27 @@ class ChamberView:
 | 
			
		||||
        self.CreateDut.ssid = temp
 | 
			
		||||
        self.CreateDut.add_ssids()
 | 
			
		||||
 | 
			
		||||
    def get_station_list(self):
 | 
			
		||||
        realm_obj = self.staConnect.localrealm
 | 
			
		||||
        sta = realm_obj.station_list()
 | 
			
		||||
        sta_list = []
 | 
			
		||||
        for i in sta:
 | 
			
		||||
            for j in i:
 | 
			
		||||
                sta_list.append(j)
 | 
			
		||||
        return sta_list
 | 
			
		||||
 | 
			
		||||
    def admin_up_down(self, sta_list=[], option="up"):
 | 
			
		||||
        realm_obj = self.staConnect.localrealm
 | 
			
		||||
        if option == "up":
 | 
			
		||||
            for i in sta_list:
 | 
			
		||||
                realm_obj.admin_up(i)
 | 
			
		||||
                time.sleep(0.005)
 | 
			
		||||
        elif option == "down":
 | 
			
		||||
            for j in sta_list:
 | 
			
		||||
                realm_obj.admin_down(j)
 | 
			
		||||
                time.sleep(0.005)
 | 
			
		||||
        time.sleep(2)
 | 
			
		||||
 | 
			
		||||
    def Chamber_View(self):
 | 
			
		||||
        if self.delete_old_scenario:
 | 
			
		||||
            self.CreateChamberview.clean_cv_scenario(type="Network-Connectivity", scenario_name=self.scenario_name)
 | 
			
		||||
@@ -292,6 +313,32 @@ class ChamberView:
 | 
			
		||||
                result = df[column_name].values.tolist()
 | 
			
		||||
                return result
 | 
			
		||||
 | 
			
		||||
    def read_csv_individual_station_throughput(self, dir_name, option):
 | 
			
		||||
        try:
 | 
			
		||||
            df = pd.read_csv("../reports/" + str(dir_name) + "/csv-data/data-Combined_bps__60_second_running_average-1.csv", sep=r'\t', engine='python')
 | 
			
		||||
            print("csv file opened")
 | 
			
		||||
        except FileNotFoundError:
 | 
			
		||||
            print("csv file does not exist")
 | 
			
		||||
            return False
 | 
			
		||||
 | 
			
		||||
        dict_data = {}
 | 
			
		||||
        if option == "download":
 | 
			
		||||
            csv_sta_names = df.iloc[[0]].values.tolist()
 | 
			
		||||
            csv_throughput_values = df.iloc[[1]].values.tolist()
 | 
			
		||||
        elif option == "upload":
 | 
			
		||||
            csv_sta_names = df.iloc[[0]].values.tolist()
 | 
			
		||||
            csv_throughput_values = df.iloc[[2]].values.tolist()
 | 
			
		||||
        else:
 | 
			
		||||
            print("Provide proper option: download or upload")
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        sta_list = csv_sta_names[0][0][:-1].replace('"', '').split(",")
 | 
			
		||||
        th_list = list(map(float, csv_throughput_values[0][0].split(",")))
 | 
			
		||||
        for i in range(len(sta_list)):
 | 
			
		||||
            dict_data[sta_list[i]] = th_list[i]
 | 
			
		||||
 | 
			
		||||
        return dict_data
 | 
			
		||||
 | 
			
		||||
    def attach_report_graphs(self, report_name=None, pdf_name="WIFI Capacity Test PDF Report"):
 | 
			
		||||
        relevant_path = "../reports/" + report_name + "/"
 | 
			
		||||
        entries = os.listdir("../reports/" + report_name + '/')
 | 
			
		||||
 
 | 
			
		||||
@@ -60,9 +60,9 @@ def scrollDown(setup_perfectoMobile):
 | 
			
		||||
    params2["start"] = "50%,90%"
 | 
			
		||||
    params2["end"] = "50%,20%"
 | 
			
		||||
    params2["duration"] = "4"
 | 
			
		||||
    time.sleep(2)
 | 
			
		||||
    # time.sleep(2)
 | 
			
		||||
    setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2)
 | 
			
		||||
    time.sleep(1)
 | 
			
		||||
    time.sleep(3)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def getDeviceID(setup_perfectoMobile):
 | 
			
		||||
@@ -1195,7 +1195,7 @@ def get_ip_address_and(request, WifiName, WifiPass, setup_perfectoMobile, connDa
 | 
			
		||||
                        print("No Connected SSIDS")
 | 
			
		||||
                    #----------------------This is to Forget current connected SSID--------------------------------
 | 
			
		||||
 | 
			
		||||
                    time.sleep(2)
 | 
			
		||||
                    # time.sleep(2)
 | 
			
		||||
                    print("Selecting Wifi: " + WifiName)
 | 
			
		||||
                   #allure.attach(name= body=str("Selecting Wifi: " + WifiName))
 | 
			
		||||
                    ssid_found = False
 | 
			
		||||
@@ -1203,7 +1203,7 @@ def get_ip_address_and(request, WifiName, WifiPass, setup_perfectoMobile, connDa
 | 
			
		||||
                    #This is To get all available ssids
 | 
			
		||||
                    #------------------------------------------------------
 | 
			
		||||
                    try:
 | 
			
		||||
                        for k in range(3):
 | 
			
		||||
                        for k in range(9):
 | 
			
		||||
                            available_ssids = get_all_available_ssids(driver)
 | 
			
		||||
                            print("active_ssid_list: ", available_ssids)
 | 
			
		||||
                            allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
 | 
			
		||||
@@ -1785,8 +1785,8 @@ def wifi_disconnect_and_forget(request, WifiName, WifiPass, setup_perfectoMobile
 | 
			
		||||
def get_all_available_ssids(driver):
 | 
			
		||||
    active_ssid_list = []
 | 
			
		||||
    try:
 | 
			
		||||
        time.sleep(5)
 | 
			
		||||
        driver.implicitly_wait(5)
 | 
			
		||||
        time.sleep(2)
 | 
			
		||||
        driver.implicitly_wait(1)
 | 
			
		||||
        elements = driver.find_elements_by_xpath("//*[@resource-id='com.android.settings:id/title']")
 | 
			
		||||
        # print("elements: ", elements)
 | 
			
		||||
        print(len(elements))
 | 
			
		||||
@@ -2191,7 +2191,7 @@ def get_ip_address_eap_and(request, WifiName, User, ttls_passwd, setup_perfectoM
 | 
			
		||||
                    #This is To get all available ssids
 | 
			
		||||
                    #------------------------------------------------------
 | 
			
		||||
                    try:
 | 
			
		||||
                        for k in range(3):
 | 
			
		||||
                        for k in range(10):
 | 
			
		||||
                            available_ssids = get_all_available_ssids(driver)
 | 
			
		||||
                            print("active_ssid_list: ", available_ssids)
 | 
			
		||||
                            allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
 | 
			
		||||
 
 | 
			
		||||
@@ -38,9 +38,9 @@ def scrollDown(setup_perfectoMobile):
 | 
			
		||||
    params2["start"] = "50%,90%"
 | 
			
		||||
    params2["end"] = "50%,20%"
 | 
			
		||||
    params2["duration"] = "4"
 | 
			
		||||
    time.sleep(5)
 | 
			
		||||
    # time.sleep(2)
 | 
			
		||||
    setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2)
 | 
			
		||||
    time.sleep(5)
 | 
			
		||||
    time.sleep(3)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def closeApp(appName, setup_perfectoMobile):
 | 
			
		||||
@@ -1015,7 +1015,7 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa
 | 
			
		||||
    available_ssids = False
 | 
			
		||||
 | 
			
		||||
    try:
 | 
			
		||||
        for check_for_all_ssids in range(2):
 | 
			
		||||
        for check_for_all_ssids in range(9):
 | 
			
		||||
            available_ssids = get_all_available_ssids(driver)
 | 
			
		||||
            allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
 | 
			
		||||
            try:
 | 
			
		||||
@@ -1177,8 +1177,8 @@ def get_all_available_ssids(driver):
 | 
			
		||||
 | 
			
		||||
    active_ssid_list = []
 | 
			
		||||
    try:
 | 
			
		||||
        time.sleep(8)
 | 
			
		||||
        driver.implicitly_wait(10)
 | 
			
		||||
        time.sleep(2)
 | 
			
		||||
        driver.implicitly_wait(2)
 | 
			
		||||
        elements = driver.find_elements_by_xpath("(//*[@label='More Info']/parent::*/XCUIElementTypeStaticText)")
 | 
			
		||||
        print(len(elements))
 | 
			
		||||
        for i in range(len(elements)):
 | 
			
		||||
@@ -1730,7 +1730,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM
 | 
			
		||||
    available_ssids = False
 | 
			
		||||
 | 
			
		||||
    try:
 | 
			
		||||
        for check_for_all_ssids in range(2):
 | 
			
		||||
        for check_for_all_ssids in range(9):
 | 
			
		||||
            available_ssids = get_all_available_ssids(driver)
 | 
			
		||||
            allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
 | 
			
		||||
            try:
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,289 @@
 | 
			
		||||
import pytest
 | 
			
		||||
import allure
 | 
			
		||||
import os
 | 
			
		||||
import time
 | 
			
		||||
import pandas as pd
 | 
			
		||||
import threading
 | 
			
		||||
 | 
			
		||||
pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, pytest.mark.bridge]
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
}
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestMultiAssoDisassoBridge(object):
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5691", name="WIFI-5691")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_upload_2g
 | 
			
		||||
    def test_multi_station_udp_upload_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_upload_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5692", name="WIFI-5692")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_download_2g
 | 
			
		||||
    def test_multi_station_udp_download_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_download_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5693", name="WIFI-5693")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_upload_5g
 | 
			
		||||
    def test_multi_station_udp_upload_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_upload_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5694", name="WIFI-5694")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_download_5g
 | 
			
		||||
    def test_multi_station_udp_download_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_download_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,289 @@
 | 
			
		||||
import pytest
 | 
			
		||||
import allure
 | 
			
		||||
import os
 | 
			
		||||
import time
 | 
			
		||||
import pandas as pd
 | 
			
		||||
import threading
 | 
			
		||||
 | 
			
		||||
#pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, 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
 | 
			
		||||
}
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestMultiAssoDisassoNat(object):
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5848", name="WIFI-5848")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_upload_2g
 | 
			
		||||
    def test_multi_station_NAT_udp_upload_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "NAT"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_upload_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5870", name="WIFI-5870")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_download_2g
 | 
			
		||||
    def test_multi_station_NAT_udp_download_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "NAT"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_download_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5871", name="WIFI-5871")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_upload_5g
 | 
			
		||||
    def test_multi_station_NAT_udp_upload_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "NAT"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_upload_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5872", name="WIFI-5872")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_download_5g
 | 
			
		||||
    def test_multi_station_NAT_udp_download_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "NAT"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_download_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,289 @@
 | 
			
		||||
import pytest
 | 
			
		||||
import allure
 | 
			
		||||
import os
 | 
			
		||||
import time
 | 
			
		||||
import pandas as pd
 | 
			
		||||
import threading
 | 
			
		||||
 | 
			
		||||
#pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, 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
 | 
			
		||||
}
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestMultiAssoDisassoVlan(object):
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5873", name="WIFI-5873")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_upload_2g
 | 
			
		||||
    def test_multi_station_VLAN_udp_upload_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "VLAN"
 | 
			
		||||
        vlan = 100
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_upload_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5874", name="WIFI-5874")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.udp_download_2g
 | 
			
		||||
    def test_multi_station_VLAN_udp_download_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "VLAN"
 | 
			
		||||
        vlan = 100
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_download_2g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 4 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5875", name="WIFI-5875")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_upload_5g
 | 
			
		||||
    def test_multi_station_VLAN_udp_upload_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "VLAN"
 | 
			
		||||
        vlan = 100
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['ul_rate_sel: Per-Station Upload Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_upload_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5876", name="WIFI-5876")
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.udp_download_5g
 | 
			
		||||
    def test_multi_station_VLAN_udp_download_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut):
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        def thread_fun(station_list):
 | 
			
		||||
            print(station_list)
 | 
			
		||||
            time.sleep(60)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="down")
 | 
			
		||||
            print("stations down")
 | 
			
		||||
            time.sleep(10)
 | 
			
		||||
            lf_tools.admin_up_down(sta_list=station_list, option="up")
 | 
			
		||||
            print("stations up")
 | 
			
		||||
 | 
			
		||||
        lf_tools.reset_scenario()
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        print(ssid_name)
 | 
			
		||||
        mode = "VLAN"
 | 
			
		||||
        vlan = 100
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        sta_list = lf_tools.get_station_list()
 | 
			
		||||
        print(sta_list)
 | 
			
		||||
        lf_tools.admin_up_down(sta_list=sta_list, option="up")
 | 
			
		||||
        sel_stations = ",".join(sta_list[0:8])
 | 
			
		||||
        val = [['dl_rate_sel: Per-Station Download Rate:']]
 | 
			
		||||
        thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],))
 | 
			
		||||
        thr1.start()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_download_5g", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000",
 | 
			
		||||
                                        create_stations=False)
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
 | 
			
		||||
        csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download")
 | 
			
		||||
        print(type(csv_val))
 | 
			
		||||
        print(csv_val)
 | 
			
		||||
        pass_value = 8 * 0.99
 | 
			
		||||
        print("pass value ", pass_value)
 | 
			
		||||
        pass_fail = []
 | 
			
		||||
        if not csv_val:
 | 
			
		||||
            print("csv file does not exist, station did not got ip, Test failed")
 | 
			
		||||
            allure.attach(name="Csv Data", body="station did not got ip Test failed.")
 | 
			
		||||
            assert False
 | 
			
		||||
        else:
 | 
			
		||||
            for i in csv_val.values():
 | 
			
		||||
                if i >= pass_value:
 | 
			
		||||
                    pass_fail.append(1)
 | 
			
		||||
                else:
 | 
			
		||||
                    pass_fail.append(0)
 | 
			
		||||
            if pass_fail.count(0) == 0:
 | 
			
		||||
                print("Test passed successfully")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert True
 | 
			
		||||
            else:
 | 
			
		||||
                print(" valueTest failed due to lesser")
 | 
			
		||||
                allure.attach(name="Csv Data", body=str(csv_val))
 | 
			
		||||
                assert False
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -403,7 +403,7 @@ def setup_perfectoMobile_android(request):
 | 
			
		||||
    driver = webdriver.Remote(
 | 
			
		||||
        'https://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
 | 
			
		||||
        capabilities)
 | 
			
		||||
    driver.implicitly_wait(35)
 | 
			
		||||
    driver.implicitly_wait(2)
 | 
			
		||||
 | 
			
		||||
    TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
 | 
			
		||||
    nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
 | 
			
		||||
@@ -507,7 +507,7 @@ def setup_perfectoMobileWeb(request):
 | 
			
		||||
    rdriver = webdriver.Remote(
 | 
			
		||||
        'https://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
 | 
			
		||||
        capabilities)
 | 
			
		||||
    rdriver.implicitly_wait(35)
 | 
			
		||||
    rdriver.implicitly_wait(2)
 | 
			
		||||
 | 
			
		||||
    projectname = request.config.getini("projectName")
 | 
			
		||||
    projectversion = request.config.getini("projectVersion")
 | 
			
		||||
@@ -570,7 +570,7 @@ def setup_perfectoMobile_iOS(request):
 | 
			
		||||
    driver = webdriver.Remote(
 | 
			
		||||
        'https://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
 | 
			
		||||
        capabilities)
 | 
			
		||||
    driver.implicitly_wait(35)
 | 
			
		||||
    driver.implicitly_wait(2)
 | 
			
		||||
 | 
			
		||||
    TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
 | 
			
		||||
    nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import string
 | 
			
		||||
import random
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -37,6 +38,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -37,6 +38,13 @@ setup_params_general = {
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-A")
 | 
			
		||||
@pytest.mark.InteropsuiteA
 | 
			
		||||
@@ -297,6 +305,12 @@ setup_params_general_two = {
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -41,6 +42,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -39,7 +40,12 @@ setup_params_general = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-A")
 | 
			
		||||
@@ -290,7 +296,12 @@ setup_params_general_two = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -37,6 +38,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,9 +9,10 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
import string
 | 
			
		||||
 | 
			
		||||
if 'perfecto_libs' not in sys.path:
 | 
			
		||||
    sys.path.append(f'../libs/perfecto_libs')
 | 
			
		||||
@@ -36,6 +37,13 @@ setup_params_general = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-A")
 | 
			
		||||
@@ -52,6 +60,8 @@ class TestNatModeConnectSuiteOne(object):
 | 
			
		||||
    """ Client Connect SuiteA
 | 
			
		||||
        pytest -m "client_connect and nat and InteropsuiteA"
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4510", name="WIFI-4510")
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
@@ -291,6 +301,12 @@ setup_params_general_two = {
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="NAT Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -40,7 +41,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -40,6 +41,12 @@ setup_params_general = {
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-A")
 | 
			
		||||
@@ -291,6 +298,12 @@ setup_params_general_two = {
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -37,6 +38,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -36,6 +37,12 @@ setup_params_general = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-A")
 | 
			
		||||
@@ -282,7 +289,12 @@ setup_params_general_two = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -40,7 +41,12 @@ setup_params_enterprise = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": True
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect : Suite-A")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,8 @@ from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
from selenium.webdriver.common.by import By
 | 
			
		||||
from appium import webdriver
 | 
			
		||||
from selenium.common.exceptions import NoSuchElementException
 | 
			
		||||
 | 
			
		||||
import random
 | 
			
		||||
import string
 | 
			
		||||
import sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@@ -38,7 +39,12 @@ setup_params_general = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-A")
 | 
			
		||||
@@ -280,7 +286,12 @@ setup_params_general_two = {
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
			
		||||
    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
			
		||||
        N = 6
 | 
			
		||||
        rand_string = ''.join(random.choices(string.ascii_uppercase +
 | 
			
		||||
                                     string.digits, k=N))
 | 
			
		||||
        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
			
		||||
 | 
			
		||||
@allure.suite(suite_name="interop sanity")
 | 
			
		||||
@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-B")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user