From a3e63d018ed2f77fb6aa63e97ee773b76b65f291 Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 14:49:09 +0530 Subject: [PATCH 01/36] Added Enterprise mode in client Connnect ios Signed-off-by: saurabh --- .../iOS/test_enterprise_ttls.py | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py new file mode 100644 index 000000000..3d6c87196 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -0,0 +1,206 @@ +from logging import exception +import io +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_eap_ios + +pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, + pytest.mark.ucentral, pytest.mark.interop] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + + +@allure.suite(suite_name="interop") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + """ + @pytest.mark.s123 + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + @pytest.mark.s123 + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @pytest.mark.sg123 + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @pytest.mark.sg123 + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False From 3fd3727c660fe43d24edd89b0b75a348d46c02e9 Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 14:50:57 +0530 Subject: [PATCH 02/36] Added Enterprise Code Signed-off-by: saurabh --- libs/perfecto_libs/iOS_lib.py | 295 ++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) diff --git a/libs/perfecto_libs/iOS_lib.py b/libs/perfecto_libs/iOS_lib.py index 21895ad66..717461234 100644 --- a/libs/perfecto_libs/iOS_lib.py +++ b/libs/perfecto_libs/iOS_lib.py @@ -1467,3 +1467,298 @@ def wifi_disconnect_and_forget(request, WifiName, WifiPass, setup_perfectoMobile # --------------------To Turn on WIFi Switch if already OFF-------------------------------- closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + +#To get an IP address +def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/AccessPoint Connection") + print("-------------------------------------") + + reportFlag = True + is_internet = False + ip_address_element_text = False + + print("Verifying Wifi/AP Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + # driver.switch_to.context(contexts[0]) + + report.step_start("Set Wifi Network to " + WifiName) + # Open Settings Application + openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + + try: + time.sleep(2) + driver.implicitly_wait(2) + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + + time.sleep(2) + driver.implicitly_wait(2) + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + try: + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("switch is OFF") + + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + print("WIFI Switch is ON") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is ON") + if(get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0): + print("switch is still OFF") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + else: + print("Switch is Still OFF") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + except: + print("No switch element found") + except: + print("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except: + print("Cannot find WIFI element") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + + # ---------------------This is to Forget current connected SSID------------------------------- + + try: + print("getting in to Additional details") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + print("Forget Connected Network") + forget_ssid = driver.find_element_by_xpath("//*[@label='Forget This Network']") + forget_ssid.click() + print("Forget old ssid") + try: + report.step_start("Forget SSID popup1") + forget_ssid_popup = driver.find_element_by_xpath("//*[@label='Forget']") + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + except: + print("No connected SSID") + + + # ---------------------This is to Forget current connected SSID------------------------------- + + # ---------------------To get all available SSID------------------------------- + print("Searching for Wifi: " + WifiName) + # allure.attach(name= body=str("Searching for Wifi: " + WifiName)) + time.sleep(2) + print("Selecting Wifi: " + WifiName) + ssid_found = False + available_ssids = False + + try: + for check_for_all_ssids in range(2): + available_ssids = get_all_available_ssids(driver) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if WifiName not in available_ssids: + scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(WifiName + " : Found in Device") + # allure.attach(name= body=str(WifiName + " : Found in Device")) + break + except: + pass + + if not ssid_found: + print("could not found " + WifiName + " in device") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + except: + pass + # ---------------------To get all available SSID------------------------------- + + # ---------------------This is to Select SSID------------------------------- + try: + wifiSelectionElement = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) + wifiSelectionElement.click() + print("Selecting SSID") + except Exception as e: + print("couldn't connect to " + WifiName) + request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + # ---------------------This is to Select SSID------------------------------- + # Set username + # ------------------------------------------------------- + try: + driver.implicitly_wait(5) + report.step_start("Set User name") + print("Set User name") + wifiUserElement = driver.find_element_by_xpath("//*[@label='Username']") + wifiUserElement.send_keys(User) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + # ------------------------------------------------------- + + # ---------------------Set Password------------------------------- + try: + driver.implicitly_wait(5) + wifiPassword = driver.find_element_by_xpath("//*[@label='Password']") + wifiPassword.send_keys(ttls_passwd) + except NoSuchElementException: + print("Enter Password Page Not Loaded") + # ---------------------Set Password------------------------------- + # ------------------------------------------------------- + + # ---------------------Click on join------------------------------- + try: + driver.implicitly_wait(5) + joinBTN = driver.find_element_by_xpath("//*[@label='Join']") + joinBTN.click() + except Exception as e: + print("Join Button Not Enabled...Password may not be needed") + # ---------------------Click on join------------------------------- + # Selecting certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Clicking Trust CA Cert") + certElement = driver.find_element_by_xpath("//*[@label='Trust']") + certElement.click() + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + # ---------------------check if internet------------------------------- + try: + WifiInternetErrMsg2 = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='No Internet Connection']"))) + # = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text + except Exception as e: + is_internet = True + print("No Wifi-AP Error Internet Error: " + WifiName) + # Need to add Wait for Selected Wifi Xpath + # time.sleep(3) + # ---------------------check if internet------------------------------- + + # ---------------------Additional INFO------------------------------- + try: + print("Selecting SSID: ",WifiName) + report.step_start("Selecting SSID") + additional_details_element = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@label='"+ WifiName+"']"))) + # //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info'] + additional_details_element.click() + + try: + print("Checking IP address") + # (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2] + ip_address_element_text = driver.find_element_by_xpath("(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text + print("ip_address_element_text: ", ip_address_element_text) + except Exception as e: + print("IP Address not Found") + request.config.cache.set(key="select IP failed", value=str(e)) + + + try: + time.sleep(2) + driver.implicitly_wait(2) + report.step_start("Forget Network") + forget_ssid = driver.find_element_by_xpath("//*[@label='Forget This Network']") + forget_ssid.click() + print("Forget old ssid") + # time.sleep(2) + # driver.implicitly_wait(3) + try: + report.step_start("Forget Network popup") + forget_ssid_popup = driver.find_element_by_xpath("//*[@label='Forget']") + forget_ssid_popup.click() + except: + print("in popup exception") + + except: + print("error on ssid element") + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + print("switch state is : ", get_wifi_switch_element_text) + try: + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("switch is ON") + + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + print("WIFI Switch is OFF") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element.click() + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is OFF") + + else: + print("Switch is Still OFF") + except: + pass + except: + print("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except Exception as e: + request.config.cache.set(key="select additional info failed", value=str(e)) + # ---------------------Additional INFO------------------------------- + + # --------------------- close app------------------------------- + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return ip_address_element_text, is_internet + # ---------------------close app------------------------------- + From 5d1ccaa82b30400c81b8ab639174050de7756fe6 Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 14:54:18 +0530 Subject: [PATCH 03/36] Added Enterprise Code Signed-off-by: saurabh --- .../client_connect_test/iOS/test_enterprise_ttls.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index 3d6c87196..533c10591 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -22,7 +22,7 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti verifyUploadDownloadSpeediOS, get_ip_address_eap_ios pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, - pytest.mark.ucentral, pytest.mark.interop] + pytest.mark.ucentral, pytest.mark.interop, pytest.mark.ios] setup_params_enterprise = { "mode": "BRIDGE", @@ -56,7 +56,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): """ SuiteA Enterprise Test Cases pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" """ - @pytest.mark.s123 + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") @pytest.mark.wpa2_enterprise @pytest.mark.twog def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): @@ -94,7 +95,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): else: allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @pytest.mark.s123 + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") @pytest.mark.fiveg @pytest.mark.wpa2_enterprise def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): @@ -130,7 +132,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @pytest.mark.sg123 + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") @pytest.mark.wpa3_enterprise @pytest.mark.twog def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): @@ -169,7 +171,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @pytest.mark.sg123 + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") @pytest.mark.fiveg @pytest.mark.wpa3_enterprise def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): From 555e7bf6287fa1f3fdf5a031f680a3e1c5b8362d Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 17:49:58 +0530 Subject: [PATCH 04/36] Marker changes Signed-off-by: saurabh --- .../client_connect_test/iOS/test_enterprise_ttls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index 533c10591..c545673fd 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -21,9 +21,9 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ verifyUploadDownloadSpeediOS, get_ip_address_eap_ios -pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, +pytestmark = [pytest.mark.client_connect, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, pytest.mark.ucentral, pytest.mark.interop, pytest.mark.ios] - + #ios and ucentral and interop and ttls and enterprise and bridge and client_connect setup_params_enterprise = { "mode": "BRIDGE", "ssid_modes": { From a6e2ae7ff2ea92585dbdd32003a45c57422f7af8 Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 18:16:26 +0530 Subject: [PATCH 05/36] Adding Markers Signed-off-by: saurabh --- .../client_connect_test/iOS/test_enterprise_ttls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index c545673fd..09ee4dfdc 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -21,9 +21,9 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ verifyUploadDownloadSpeediOS, get_ip_address_eap_ios -pytestmark = [pytest.mark.client_connect, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, - pytest.mark.ucentral, pytest.mark.interop, pytest.mark.ios] - #ios and ucentral and interop and ttls and enterprise and bridge and client_connect +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect + ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + setup_params_enterprise = { "mode": "BRIDGE", "ssid_modes": { From 826f2ebfb42108818047538e48d3547404b1d1fd Mon Sep 17 00:00:00 2001 From: saurabh Date: Wed, 6 Oct 2021 23:17:49 +0530 Subject: [PATCH 06/36] Added Enterprise testcases Signed-off-by: saurabh --- .../client_connect_test/iOS/test_enterprise_ttls.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index 09ee4dfdc..9dac56370 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -27,9 +27,6 @@ pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.m setup_params_enterprise = { "mode": "BRIDGE", "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], "wpa2_enterprise": [ {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], @@ -59,7 +56,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") @pytest.mark.wpa2_enterprise - @pytest.mark.twog + @pytest.mark.fiveg def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -97,7 +94,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") - @pytest.mark.fiveg + @pytest.mark.twog @pytest.mark.wpa2_enterprise def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): @@ -134,7 +131,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") @pytest.mark.wpa3_enterprise - @pytest.mark.twog + @pytest.mark.fiveg def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -172,7 +169,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") - @pytest.mark.fiveg + @pytest.mark.twog @pytest.mark.wpa3_enterprise def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): From 345ef8e6b384ec81a0e86452eeca7f6887ef2b13 Mon Sep 17 00:00:00 2001 From: Max Brenner Date: Thu, 7 Oct 2021 11:49:45 +0200 Subject: [PATCH 07/36] increase kubectl wait timeout --- .github/workflows/interop.yml | 2 +- .github/workflows/manual.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/quali.yml | 2 +- .github/workflows/sanity.yml | 2 +- .github/workflows/uc_interop.yml | 2 +- .github/workflows/uc_sanity.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 7d3f9f10b..b93c5d758 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -153,7 +153,7 @@ jobs: podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s until [ -s test_everything.xml ] do diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index f858961f0..150d4e03b 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -158,7 +158,7 @@ jobs: # wait for pod to spawn sleep 1 podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s kubectl logs -f $podname & #sleep 30 # wait for the pod to come up until [ -s test_everything.xml ] diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 6f74c389e..4ceff2135 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -156,7 +156,7 @@ jobs: # wait for pod to spawn sleep 1 podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s #sleep 30 # wait for the pod to come up until [ -s test_everything.xml ] do diff --git a/.github/workflows/quali.yml b/.github/workflows/quali.yml index a1887dbba..e70f39851 100644 --- a/.github/workflows/quali.yml +++ b/.github/workflows/quali.yml @@ -499,7 +499,7 @@ jobs: # wait for pod to spawn sleep 1 podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s kubectl logs -f $podname & #sleep 30 # wait for the pod to come up until [ -s test_everything.xml ] diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 7f2a32240..ec368e317 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -212,7 +212,7 @@ jobs: podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s #sleep 30 # wait for the pod to come up diff --git a/.github/workflows/uc_interop.yml b/.github/workflows/uc_interop.yml index 10f233b47..ab0d61eb9 100644 --- a/.github/workflows/uc_interop.yml +++ b/.github/workflows/uc_interop.yml @@ -153,7 +153,7 @@ jobs: podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s until [ -s test_everything.xml ] do diff --git a/.github/workflows/uc_sanity.yml b/.github/workflows/uc_sanity.yml index af20305ec..c77f71ce7 100644 --- a/.github/workflows/uc_sanity.yml +++ b/.github/workflows/uc_sanity.yml @@ -293,7 +293,7 @@ jobs: # wait for pod to spawn sleep 1 podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") - kubectl wait "pod/$podname" --for condition=ready + kubectl wait "pod/$podname" --for condition=ready --timeout=600s #sleep 30 # wait for the pod to come up until [ -s test_everything.xml ] do From b5236a45d67634cf82461512a6f26d7c36c5c46f Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Thu, 7 Oct 2021 23:14:51 +0530 Subject: [PATCH 08/36] Added get_ap_logs in enterprise testcases --- .../client_connect_test/iOS/test_enterprise_ttls.py | 12 ++++++++---- .../android/test_enterprise_ttls.py | 9 +++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index 9dac56370..5772a7499 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -57,7 +57,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" """ @@ -96,7 +97,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] @@ -132,7 +134,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" """ @@ -171,7 +174,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS, radius_info): + def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py index 3fc459ec5..9e758bf14 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py @@ -53,7 +53,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4665", name="WIFI-4665") @pytest.mark.fiveg @pytest.mark.wpa2_enterprise - def test_ClientConnect_5g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android, radius_info): + def test_ClientConnect_5g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] @@ -90,7 +91,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.twog @pytest.mark.wpa2_enterprise def test_ClientConnect_2g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info): + setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] @@ -128,7 +129,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.fiveg @pytest.mark.wpa3_enterprise def test_ClientConnect_5g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info): + setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] @@ -166,7 +167,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.twog @pytest.mark.wpa3_enterprise def test_ClientConnect_2g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info): + setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] From 0aad52a9d25223dabb8e527bff3159a0684d7e30 Mon Sep 17 00:00:00 2001 From: saurabh Date: Thu, 7 Oct 2021 23:47:52 +0530 Subject: [PATCH 09/36] Added AP Logs Signed-off-by: saurabh --- .../android/test_general_security_modes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py index 547a183b5..f1fe881d4 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py @@ -56,7 +56,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4613", name="WIFI-4613") @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssidName = profile_data["ssid_name"] @@ -90,7 +90,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4612", name="WIFI-4612") @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -124,7 +124,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4611", name="WIFI-4611") @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_5g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -159,7 +159,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4609", name="WIFI-4609") @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_2g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -194,7 +194,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4607", name="WIFI-4607") @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnect_5g_Open_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -235,7 +235,7 @@ class TestVlanModeConnectSuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4606", name="WIFI-4606") @pytest.mark.twog @pytest.mark.open - def test_ClientConnect_2g_Open_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnect_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] From 69522f31200b7441d07b53668a4322f8f06c19f9 Mon Sep 17 00:00:00 2001 From: saurabh Date: Thu, 7 Oct 2021 23:48:01 +0530 Subject: [PATCH 10/36] Added AP Logs Signed-off-by: saurabh --- .../iOS/test_general_security_mode.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py index 6f1b7efed..b65a484ce 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py @@ -59,7 +59,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4594", name="WIFI-4594") @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, + def test_ClientConnect_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] @@ -92,7 +92,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4593", name="WIFI-4593") @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -125,7 +125,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4586", name="WIFI-4586") @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnect_5g_WPA_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -158,7 +158,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4585", name="WIFI-4585") @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnect_2g_WPA_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -191,7 +191,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4583", name="WIFI-4583") @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnect_5g_Open_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -230,7 +230,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4581", name="WIFI-4581") @pytest.mark.twog @pytest.mark.open - def test_ClientConnect_2g_Open_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] From cf55a79bf44d065906c96d8554b1d1ea00877e66 Mon Sep 17 00:00:00 2001 From: saurabh Date: Thu, 7 Oct 2021 23:48:12 +0530 Subject: [PATCH 11/36] Added AP Logs Signed-off-by: saurabh --- .../android/test_general_security_modes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py index 5b34daa64..c9885116d 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py @@ -57,7 +57,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4631", name="WIFI-4631") @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssidName = profile_data["ssid_name"] @@ -96,7 +96,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4630", name="WIFI-4630") @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -135,7 +135,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4629", name="WIFI-4629") @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_5g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -174,7 +174,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4630", name="WIFI-4630") @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_2g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -213,7 +213,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4627", name="WIFI-4627") @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnectivity_5g_Open_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -252,7 +252,7 @@ class TestVlanModeConnectivitySuiteOne(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4626", name="WIFI-4626") @pytest.mark.twog @pytest.mark.open - def test_ClientConnectivity_2g_Open_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + def test_ClientConnectivity_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] From 197cab4cadc1dc43443494584acb5e81d5b5656c Mon Sep 17 00:00:00 2001 From: saurabh Date: Thu, 7 Oct 2021 23:48:22 +0530 Subject: [PATCH 12/36] Added AP Logs Signed-off-by: saurabh --- .../iOS/test_general_security_modes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py index 65f7b91f4..11f43cb36 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py @@ -59,7 +59,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4610", name="WIFI-4610") @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, + def test_ClientConnectivity_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] @@ -96,7 +96,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4608", name="WIFI-4608") @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnectivity_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -131,7 +131,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4604", name="WIFI-4604") @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnectivity_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -167,7 +167,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4603", name="WIFI-4603") @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnectivity_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -203,7 +203,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4602", name="WIFI-4602") @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnectivity_5g_Open_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnectivity_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -239,7 +239,7 @@ class TestVlanModeConnectSuiteOneVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4601", name="WIFI-4601") @pytest.mark.twog @pytest.mark.open - def test_ClientConnectivity_2g_Open_VLAN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnectivity_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] From 6c8a76458bbe9dc4129e26d5e06975c367256233 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Fri, 8 Oct 2021 12:45:39 +0530 Subject: [PATCH 13/36] Added Enterprise lib in android for wifi_connect --- libs/perfecto_libs/android_lib.py | 276 ++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) diff --git a/libs/perfecto_libs/android_lib.py b/libs/perfecto_libs/android_lib.py index fe451046b..a887311d8 100644 --- a/libs/perfecto_libs/android_lib.py +++ b/libs/perfecto_libs/android_lib.py @@ -2402,6 +2402,282 @@ def get_ip_address_eap_and(request, WifiName, User, ttls_passwd, setup_perfectoM closeApp(connData["appPackage-android"], setup_perfectoMobile) return ip_address_element_text, ssid_with_internet +#only to connect to wifi +def wifi_connect_eap(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/AccessPoint Connection") + print("-------------------------------------") + print("Verifying Wifi Connection Details....") + #allure.attach(name= body=str("\n-------------------------------------")) + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + ssid_with_internet = False + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + contexts = driver.contexts + driver.switch_to.context(contexts[0]) + + # Open Settings Application + openApp(connData["appPackage-android"], setup_perfectoMobile) + deviceModelName = getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + deviceModelName) + #allure.attach(name= body=str("\Selected Device Model: " + deviceModelName)) + if deviceModelName != ("Pixel 4"): + report.step_start("Set Wifi Network to " + WifiName) + + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + report.step_start("Click Connections") + connElement = driver.find_element_by_xpath("//*[@text='Connections']") + connElement.click() + + + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") + wifiElement.click() + + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + print("get_switch_text: ",get_switch_text) + print("Find wifi switch") + try: #To Turn on Wi-Fi Switch + if get_switch_text == "Off": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if get_switch_text == "On": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + except: + pass + print("Sleeping for: ", i) + time.sleep(i) + pass + if get_switch_text == "Off": + print("Switch is Still OFF") + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + else: + print("Switch is already On") + check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + + #---------------------This is to Forget current connected SSID------------------------------- + try: #To deal with already connected SSID + check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_network_category']") + try: #To forget exhisting ssid + print("To forget ssid") + check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + try: + check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") + forget_ssid.click() + print("Forget old ssid") + except: + print("Couldn't forget ssid") + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + except: + print("Couldn't get into additional details") + except: + print("No Connected SSIDS") + #----------------------This is to Forget current connected SSID-------------------------------- + + + print("Searching for Wifi: " + WifiName) + #allure.attach(name= body=str("Searching for Wifi: " + WifiName)) + time.sleep(2) + print("Selecting Wifi: " + WifiName) + ssid_found = False + available_ssids = False + # This is To get all available ssids + # ------------------------------------------------------ + try: + for check_for_all_ssids in range(2): + available_ssids = get_all_available_ssids(driver) + try: + if WifiName not in available_ssids: + scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(WifiName + " : Found in Device") + #allure.attach(name= body=str(WifiName + " : Found in Device")) + break + except: + print("1538") + pass + if not ssid_found: + print("could not found" + WifiName + " in device") + #allure.attach(name= body=str("could not found" + WifiName + " in device")) + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + except: + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + # ------------------------------------------------------- + + # Selecting WIFI + # ------------------------------------------------------- + try: + report.step_start("Selecting Wifi: " + WifiName) + print("Selecting Wifi") + wifiSelectionElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) + wifiSelectionElement.click() + check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + # ------------------------------------------------------- + + # Set username + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Set User name") + print("Set User name") + wifiUserElement = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/edittext' and @password='false']") + wifiUserElement.send_keys(User) + except NoSuchElementException: + print("User name not Loaded") + # ------------------------------------------------------- + + # Set Password + # ------------------------------------------------------- + try: + driver.implicitly_wait(6) + report.step_start("Set Password") + print("Set Password") + wifiPasswordElement = driver.find_element_by_xpath( + "//*[@text='Enter password']") + wifiPasswordElement.send_keys(ttls_passwd) + print("Entered Password") + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + # ------------------------------------------------------- + # Selecting certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Selecting CA Cert") + certElement = driver.find_element_by_xpath( + "//*[@text='Select certificate']") + certElement.click() + except NoSuchElementException: + print("Selecting certificate failed") + # ------------------------------------------------------- + # Validating certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Validting CA Cert") + certElement = driver.find_element_by_xpath( + "//*[@text=\"Don't validate\"]") + certElement.click() + except NoSuchElementException: + print("validation failed") + # ------------------------------------------------------- + + # Click on connect button + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Click Connect Button") + joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") + joinBTNElement.click() + except NoSuchElementException: + print("Connect Button Not Enabled...Verify if Password is set properly ") + check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + #Verify if WiFi is connected + # ------------------------------------------------------- + try: + report.step_start("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + #allure.attach(name= body=str("Wifi Successfully Connected")) + # time.sleep(5) + check_if_no_internet_popup(driver) + except: + try: + check_if_no_internet_popup(driver) + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + + WifiName + "']"))) + print("Wifi Successfully Connected without internet") + #allure.attach(name= body=str("Wifi Successfully Connected without internet")) + check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + #allure.attach(name=body=str("Wifi Successfully Connected")) + except NoSuchElementException: + print("Wifi Connection Error: " + WifiName) + #allure.attach(name=body=str("Wifi Connection Error: " + WifiName)) + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + + + except NoSuchElementException: + print("No Switch element found") + #allure.attach(name= body=str("No Switch element found")) + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except NoSuchElementException: + print("Couldn't find wifi Button") + #allure.attach(name= body=str("Couldn't find wifi Button")) + # ------------------Open WIFI page---------------------------------- + + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + #allure.attach(name= body=str("Exception: Verify Xpath - Update/check Xpath for Click Connections")) + # -----------------To Open Connections page--------------------------- + + closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet def close_driver(driver): driver.close() From b490437830d7634ceafc5a83e55bdacb6fe6c394 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Fri, 8 Oct 2021 12:46:35 +0530 Subject: [PATCH 14/36] Added some more functionality in testcases --- .../android/test_enterprise_ttls.py | 93 +++++++++++-------- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py index 9e758bf14..9ce55d0ee 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py @@ -19,7 +19,8 @@ if 'perfecto_libs' not in sys.path: pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_eap_and +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ + get_ip_address_eap_and, verifyUploadDownloadSpeed_android, wifi_connect_eap, wifi_disconnect_and_forget setup_params_enterprise = { "mode": "BRIDGE", @@ -53,12 +54,12 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4665", name="WIFI-4665") @pytest.mark.fiveg @pytest.mark.wpa2_enterprise - def test_ClientConnect_5g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] + ssidPassword = profile_data["security_key"] print ("SSID_NAME: " + ssidName) #print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -72,30 +73,33 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): driver = setup_perfectoMobile_android[0] connData = get_ToggleAirplaneMode_data - # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: + # Set Wifi/AP Mode + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4664", name="WIFI-4664") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): + def test_ClientConnectivity_2g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] + ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -109,31 +113,34 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): driver = setup_perfectoMobile_android[0] connData = get_ToggleAirplaneMode_data - # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: + # Set Wifi/AP Mode + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4667", name="WIFI-4667") @pytest.mark.fiveg @pytest.mark.wpa3_enterprise - def test_ClientConnect_5g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): + def test_ClientConnectivity_5g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] + ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -147,31 +154,34 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): driver = setup_perfectoMobile_android[0] connData = get_ToggleAirplaneMode_data - # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: + # Set Wifi/AP Mode + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4666", name="WIFI-4666") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): + def test_ClientConnectivity_2g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] + ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -185,18 +195,21 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): driver = setup_perfectoMobile_android[0] connData = get_ToggleAirplaneMode_data - # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: + # Set Wifi/AP Mode + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False \ No newline at end of file From 9e8164b26da447a6486999642f2dc348cf851cb7 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Fri, 8 Oct 2021 12:47:19 +0530 Subject: [PATCH 15/36] Added Client connect testcases in Android --- .../android/test_enterprise_ttls.py | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py new file mode 100644 index 000000000..af3086c52 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py @@ -0,0 +1,202 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect + ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_eap_and + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4836", name="WIFI-4836") + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + def test_ClientConnect_5g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + #ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + #print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4835", name="WIFI-4835") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnect_2g_WPA2_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4838", name="WIFI-4838") + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + def test_ClientConnect_5g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4837", name="WIFI-4837") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnect_2g_WPA3_enterprise(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False \ No newline at end of file From bd8d76f938da7a4f559e06d84ce9a3ef20ecfd7d Mon Sep 17 00:00:00 2001 From: saurabh Date: Fri, 8 Oct 2021 14:14:51 +0530 Subject: [PATCH 16/36] Added Code For Client Connectivity Signed-off-by: saurabh --- libs/perfecto_libs/iOS_lib.py | 188 +++++++++++++++- .../iOS/test_enterprise_ttls.py | 209 ++++++++++++++++++ 2 files changed, 396 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py diff --git a/libs/perfecto_libs/iOS_lib.py b/libs/perfecto_libs/iOS_lib.py index 717461234..ead0fbcd6 100644 --- a/libs/perfecto_libs/iOS_lib.py +++ b/libs/perfecto_libs/iOS_lib.py @@ -1679,7 +1679,7 @@ def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoM try: print("Selecting SSID: ",WifiName) report.step_start("Selecting SSID") - additional_details_element = WebDriverWait(driver, 30).until( + additional_details_element = WebDriverWait(driver, 35).until( EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='"+ WifiName+"']"))) # //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info'] @@ -1762,3 +1762,189 @@ def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoM return ip_address_element_text, is_internet # ---------------------close app------------------------------- +def wifi_connect_eap(request, WifiName, ttls_passwd, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/AccessPoint Connection") + print("-------------------------------------") + + reportFlag = True + is_internet = False + ip_address_element_text = False + + print("Verifying Wifi/AP Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + # driver.switch_to.context(contexts[0]) + + report.step_start("Set Wifi Network to " + WifiName) + # Open Settings Application + openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + try: + time.sleep(2) + driver.implicitly_wait(2) + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + + time.sleep(2) + driver.implicitly_wait(2) + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + try: + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("switch is OFF") + + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + print("WIFI Switch is ON") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is ON") + if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0): + print("switch is still OFF") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + else: + print("Switch is Still OFF") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + except: + print("No switch element found") + except: + print("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except: + print("Cannot find WIFI element") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + + # ---------------------This is to Forget current connected SSID------------------------------- + + try: + print("getting in to Additional details") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + print("Forget Connected Network") + forget_ssid = driver.find_element_by_xpath("//*[@label='Forget This Network']") + forget_ssid.click() + print("Forget old ssid") + try: + report.step_start("Forget SSID popup1") + forget_ssid_popup = driver.find_element_by_xpath("//*[@label='Forget']") + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + except: + print("No connected SSID") + + # ---------------------This is to Forget current connected SSID------------------------------- + + # ---------------------To get all available SSID------------------------------- + print("Searching for Wifi: " + WifiName) + # allure.attach(name= body=str("Searching for Wifi: " + WifiName)) + time.sleep(2) + print("Selecting Wifi: " + WifiName) + ssid_found = False + available_ssids = False + + try: + for check_for_all_ssids in range(2): + available_ssids = get_all_available_ssids(driver) + try: + if WifiName not in available_ssids: + scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(WifiName + " : Found in Device") + # allure.attach(name= body=str(WifiName + " : Found in Device")) + break + except: + pass + + if not ssid_found: + print("could not found " + WifiName + " in device") + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + except: + pass + # ---------------------To get all available SSID------------------------------- + + # ---------------------This is to Select SSID------------------------------- + try: + wifiSelectionElement = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) + wifiSelectionElement.click() + print("Selecting SSID") + except Exception as e: + print("couldn't connect to " + WifiName) + request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + # ---------------------This is to Select SSID------------------------------- + + # ---------------------Set Password------------------------------- + try: + wifiPassword = driver.find_element_by_xpath("//*[@label='Password']") + wifiPassword.send_keys(ttls_passwd) + except NoSuchElementException: + print("Enter Password Page Not Loaded") + # ---------------------Set Password------------------------------- + + # ---------------------Click on join------------------------------- + try: + joinBTN = driver.find_element_by_xpath("//*[@label='Join']") + joinBTN.click() + except Exception as e: + print("Join Button Not Enabled...Password may not be needed") + # ---------------------Click on join------------------------------- + + # ---------------------check if internet------------------------------- + try: + WifiInternetErrMsg2 = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='No Internet Connection']"))) + # = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text + except Exception as e: + is_internet = True + print("No Wifi-AP Error Internet Error: " + WifiName) + # Need to add Wait for Selected Wifi Xpath + # time.sleep(3) + # ---------------------check if internet------------------------------- + + + # --------------------- close app------------------------------- + closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet + # ---------------------close app------------------------------- diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py new file mode 100644 index 000000000..5772a7499 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -0,0 +1,209 @@ +from logging import exception +import io +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_eap_ios + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect + ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + + +@allure.suite(suite_name="interop") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False From 3a779404ad5d6dcfb6bdc75bb6da60979f8555eb Mon Sep 17 00:00:00 2001 From: saurabh Date: Fri, 8 Oct 2021 14:16:06 +0530 Subject: [PATCH 17/36] Added testcasses for Client Connectivity-ios Signed-off-by: saurabh --- .../iOS/test_enterprise_ttls.py | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py index 5772a7499..2c5534660 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -19,7 +19,7 @@ if 'perfecto_libs' not in sys.path: from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios + verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] @@ -54,10 +54,10 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -82,22 +82,25 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4710", name="WIFI-4710") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] @@ -119,22 +122,25 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4715", name="WIFI-4715") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -159,22 +165,25 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4714", name="WIFI-4714") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] @@ -196,14 +205,17 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): # Set Wifi/AP Mode ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: + if is_internet: + if ip: text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - assert True + + wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False From 7a9d8be444bbef78be346cea7b50f59206db8c69 Mon Sep 17 00:00:00 2001 From: saurabh Date: Fri, 8 Oct 2021 14:22:08 +0530 Subject: [PATCH 18/36] Added testcasses for Client Connectivity-ios Signed-off-by: saurabh --- .../client_connectivity_test/iOS/test_enterprise_ttls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py index 2c5534660..752eaac06 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -21,7 +21,7 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] setup_params_enterprise = { From 8a0ddaa518e7ca3a23e091660563a33679c7a11d Mon Sep 17 00:00:00 2001 From: sushant Date: Fri, 8 Oct 2021 22:15:50 +0530 Subject: [PATCH 19/36] - changing interop sanity run to select client_connect testcases only Signed-off-by: Sushant Bawiskar --- .github/workflows/interop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index b93c5d758..28cecba84 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -97,9 +97,9 @@ jobs: id: marker run: | if [ "${{ matrix.test_type }}" = "android" ]; then - MARKER_EXPRESSION="interop_and and interop_uc_sanity" + MARKER_EXPRESSION="interop_and and interop_uc_sanity and client_connect" else - MARKER_EXPRESSION="interop_ios and interop_uc_sanity" + MARKER_EXPRESSION="interop_ios and interop_uc_sanity and client_connect" fi ADDITIONAL_MARKERS="${{ github.event.inputs.additional_markers || '' }}" From efff8da62e0aad1802160c6900fa78308410a112 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Fri, 8 Oct 2021 22:32:53 +0530 Subject: [PATCH 20/36] Corrected ssid password --- .../android/test_enterprise_ttls.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py index 9ce55d0ee..74ea370e0 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py @@ -59,7 +59,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] + ssidPassword = ["BLANK"] print ("SSID_NAME: " + ssidName) #print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -99,7 +99,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] + ssidPassword = ["BLANK"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -140,7 +140,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] + ssidPassword = ["BLANK"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -181,7 +181,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] + ssidPassword = ["BLANK"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] From 7cf76d652088d154d708418ae2e4d52bf2c560c0 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 11:12:39 +0530 Subject: [PATCH 21/36] Added Nat mode client_connectivity testcases for Enterprise mode in Android --- .../android/test_enterprise_ttls.py | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py new file mode 100644 index 000000000..ff834cb30 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py @@ -0,0 +1,215 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity + ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ + get_ip_address_eap_and, verifyUploadDownloadSpeed_android, wifi_connect_eap, wifi_disconnect_and_forget + +setup_params_enterprise = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestNatModeEnterpriseTTLSSuiteA(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4673", name="WIFI-4673") + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + def test_ClientConnectivity_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] + print ("SSID_NAME: " + ssidName) + #print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + # Set Wifi/AP Mode + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4672", name="WIFI-4672") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnectivity_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + # Set Wifi/AP Mode + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4675", name="WIFI-4675") + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + def test_ClientConnectivity_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + # Set Wifi/AP Mode + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4674", name="WIFI-4674") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnectivity_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + # Set Wifi/AP Mode + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False \ No newline at end of file From 28261c4b3e41d48c639e3cf27058b5372e1e31e4 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 11:13:10 +0530 Subject: [PATCH 22/36] Added Nat mode client_connect testcases for Enterprise mode in Android --- .../android/test_enterprise_ttls.py | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py new file mode 100644 index 000000000..6be9dcc68 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py @@ -0,0 +1,202 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect + ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_eap_and + +setup_params_enterprise = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestNatModeEnterpriseTTLSSuiteA(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4823", name="WIFI-4823") + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + def test_ClientConnect_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + #ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + #print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4822", name="WIFI-4822") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnect_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4825", name="WIFI-4825") + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + def test_ClientConnect_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4824", name="WIFI-4824") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnect_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, + setup_perfectoMobile_android, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False \ No newline at end of file From 9c397539aeee5e5a0c1b66483e9c08cf79dc4a1a Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 12:58:55 +0530 Subject: [PATCH 23/36] Added testcasses for Client Connectivity-ios Signed-off-by: saurabh --- .../client_connectivity_test/iOS/test_enterprise_ttls.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py index 752eaac06..55b338cac 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -55,9 +55,10 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") + @pytest.mark.sg123 @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -100,7 +101,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4710", name="WIFI-4710") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] @@ -140,7 +141,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4715", name="WIFI-4715") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -183,7 +184,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4714", name="WIFI-4714") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] From 67fe8bd77f7a501e8ba9f37293a0da9404ba5f7a Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 13:13:49 +0530 Subject: [PATCH 24/36] Added extra securities in Vlan mode Client_connect test in Android --- .../android/test_general_security_modes.py | 245 ++++++++++++++++++ 1 file changed, 245 insertions(+) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py index f1fe881d4..bbe838baa 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py @@ -268,6 +268,251 @@ class TestVlanModeConnectSuiteOne(object): assert False +setup_params_general_two = { + "mode": "VLAN", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}] + }, + "rf": {}, + "radius": False +} +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-B") +@pytest.mark.InteropsuiteB +@allure.feature("VLAN MODE CLIENT CONNECT") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general_two], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestVlanModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect and vlan and InteropsuiteB" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4617", name="WIFI-4617") + @pytest.mark.hari + @pytest.mark.fiveg + @pytest.mark.wpa3_personal + def test_ClientConnect_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4616", name="WIFI-4616") + @pytest.mark.twog + @pytest.mark.wpa3_personal + def test_ClientConnect_2g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4623", name="WIFI-4623") + @pytest.mark.fiveg + @pytest.mark.wpa3_personal_mixed + def test_ClientConnect_5g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4621", name="WIFI-4621") + @pytest.mark.twog + @pytest.mark.wpa3_personal_mixed + def test_ClientConnect_2g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4625", name="WIFI-4625") + @pytest.mark.fiveg + @pytest.mark.wpa_wpa2_personal_mixed + def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + #Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4624", name="WIFI-4624") + @pytest.mark.twog + @pytest.mark.wpa_wpa2_personal_mixed + def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + From b6b4f7ee4a928776894d403c736e424b181d5da0 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 13:40:21 +0530 Subject: [PATCH 25/36] changed name in allure suite --- .../client_connect_test/android/test_enterprise_ttls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py index af3086c52..a9255ba60 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py @@ -36,7 +36,7 @@ setup_params_enterprise = { } @allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") @pytest.mark.suiteA @pytest.mark.parametrize( 'setup_profiles', From 422132962f4c8f2475e3debd516084147547c704 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 13:40:53 +0530 Subject: [PATCH 26/36] Removed unnecessary marker --- .../android/test_general_security_modes.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py index bbe838baa..7c1fe5839 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py @@ -199,8 +199,8 @@ class TestVlanModeConnectSuiteOne(object): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) get_vif_state.append(ssidName) if ssidName not in get_vif_state: @@ -226,11 +226,6 @@ class TestVlanModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - #Toggle AirplaneMode - # assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4606", name="WIFI-4606") @pytest.mark.twog @@ -240,8 +235,8 @@ class TestVlanModeConnectSuiteOne(object): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) get_vif_state.append(ssidName) if ssidName not in get_vif_state: @@ -305,7 +300,6 @@ class TestVlanModeConnectSuiteTwo(object): pytest -m "client_connect and vlan and InteropsuiteB" """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4617", name="WIFI-4617") - @pytest.mark.hari @pytest.mark.fiveg @pytest.mark.wpa3_personal def test_ClientConnect_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): From 6df4e4f2c1db6ca642fa72ba07ac166cb31bdb19 Mon Sep 17 00:00:00 2001 From: haricharan-jaka Date: Mon, 11 Oct 2021 15:51:11 +0530 Subject: [PATCH 27/36] Added extra security testcases in Vlan mode Client_connectivity test in Android --- .../android/test_general_security_modes.py | 268 ++++++++++++++++++ 1 file changed, 268 insertions(+) diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py index c9885116d..5bd560df0 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py @@ -289,4 +289,272 @@ class TestVlanModeConnectivitySuiteOne(object): assert False +setup_params_general_two = { + "mode": "VLAN", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}] + }, + "rf": {}, + "radius": False +} +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Vlan Mode Client Connectivity : Suite-B") +@pytest.mark.InteropsuiteB +@allure.feature("Vlan MODE CLIENT CONNECTIVITY") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general_two], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestVlanModeConnectivitySuiteTwo(object): + """ Client Connect SuiteB + pytest -m "client_connect and vlan and InteropsuiteB" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4632", name="WIFI-4632") + @pytest.mark.wpa3_personal + @pytest.mark.twog + def test_ClientConnectivity_wpa3_personal_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4633", name="WIFI-4633") + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + def test_ClientConnectivity_wpa3_personal_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4634", name="WIFI-4634") + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + def test_ClientConnectivity_wpa3_personal_mixed_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4635", name="WIFI-4635") + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + def test_ClientConnectivity_wpa3_personal_mixed_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4636", name="WIFI-4636") + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + def test_ClientConnectivity_wpa_wpa2_personal_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4637", name="WIFI-4637") + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + def test_ClientConnectivity_wpa_wpa2_personal_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print ("SSID_NAME: " + ssidName) + print ("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + # + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False From e74beb342a9c6c1b6c38359ef83a68df6f697a66 Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:37:44 +0530 Subject: [PATCH 28/36] Changes in ios lib for stability Signed-off-by: saurabh --- libs/perfecto_libs/iOS_lib.py | 56 +++-- .../iOS/test_enterprise_ttls.py | 209 +++++++++++++++++ .../iOS/test_enterprise_ttls.py | 221 ++++++++++++++++++ 3 files changed, 472 insertions(+), 14 deletions(-) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py diff --git a/libs/perfecto_libs/iOS_lib.py b/libs/perfecto_libs/iOS_lib.py index ead0fbcd6..7fefa0a36 100644 --- a/libs/perfecto_libs/iOS_lib.py +++ b/libs/perfecto_libs/iOS_lib.py @@ -514,16 +514,22 @@ def verifyUploadDownloadSpeediOS(request, setup_perfectoMobile, get_APToMobileDe driver.switch_to.context('WEBVIEW_1') - - print("Launching Safari") - report.step_start("Google Home Page") - driver.get(connData["webURL"]) - print("Enter Search Text") - elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"]) - elementFindTxt.send_keys("Internet Speed Test") + try: + print("Launching Safari") + report.step_start("Google Home Page") + driver.get(connData["webURL"]) + print("Enter Search Text") + elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"]) + elementFindTxt.send_keys("Internet Speed Test") + except Exception as e: + print("Launching Safari Failed") + print(e) try: print("Click Search Button") + report.step_start("Click Search Button") + time.sleep(2) + driver.implicitly_wait(2) # elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']/li[1]/div[1]") elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") elelSearch.click() @@ -537,7 +543,7 @@ def verifyUploadDownloadSpeediOS(request, setup_perfectoMobile, get_APToMobileDe driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click() except NoSuchElementException: currentResult = False - print("Run Speed Test Button element not found") + print("Run Speed Test Button element not found",NoSuchElementException) return currentResult #Get upload/Download Speed @@ -1665,7 +1671,7 @@ def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoM print("Password Page Not Loaded, password May be cached in the System") # ---------------------check if internet------------------------------- try: - WifiInternetErrMsg2 = WebDriverWait(driver, 30).until( + WifiInternetErrMsg2 = WebDriverWait(driver, 35).until( EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='No Internet Connection']"))) # = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text except Exception as e: @@ -1687,6 +1693,7 @@ def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoM try: print("Checking IP address") + time.sleep(4) # (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2] ip_address_element_text = driver.find_element_by_xpath("(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text print("ip_address_element_text: ", ip_address_element_text) @@ -1762,7 +1769,7 @@ def get_ip_address_eap_ios(request, WifiName ,User, ttls_passwd, setup_perfectoM return ip_address_element_text, is_internet # ---------------------close app------------------------------- -def wifi_connect_eap(request, WifiName, ttls_passwd, setup_perfectoMobile, connData): +def wifi_connect_eap(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): print("\n-------------------------------------") print("Select Wifi/AccessPoint Connection") print("-------------------------------------") @@ -1914,14 +1921,25 @@ def wifi_connect_eap(request, WifiName, ttls_passwd, setup_perfectoMobile, connD closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) return is_internet # ---------------------This is to Select SSID------------------------------- - - # ---------------------Set Password------------------------------- + # -------------------------Set username--------------------------------- + # ------------------------------------------------------- try: + driver.implicitly_wait(5) + report.step_start("Set User name") + print("Set User name") + wifiUserElement = driver.find_element_by_xpath("//*[@label='Username']") + wifiUserElement.send_keys(User) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + # ------------------------------------------------------- + + # ---------------------Set Password------------------------------- + try: + driver.implicitly_wait(5) wifiPassword = driver.find_element_by_xpath("//*[@label='Password']") wifiPassword.send_keys(ttls_passwd) except NoSuchElementException: print("Enter Password Page Not Loaded") - # ---------------------Set Password------------------------------- # ---------------------Click on join------------------------------- try: @@ -1930,7 +1948,17 @@ def wifi_connect_eap(request, WifiName, ttls_passwd, setup_perfectoMobile, connD except Exception as e: print("Join Button Not Enabled...Password may not be needed") # ---------------------Click on join------------------------------- - + #Selecting certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + print("Trust certificate") + report.step_start("Clicking Trust CA Cert") + certElement = driver.find_element_by_xpath("//*[@label='Trust']") + certElement.click() + print("Certificate selected") + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") # ---------------------check if internet------------------------------- try: WifiInternetErrMsg2 = WebDriverWait(driver, 30).until( diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py new file mode 100644 index 000000000..5247b85f1 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -0,0 +1,209 @@ +from logging import exception +import io +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_eap_ios + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect + ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + + +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + def test_ClientConnect_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnect_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + def test_ClientConnect_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnect_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py new file mode 100644 index 000000000..4e82088c8 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -0,0 +1,221 @@ +from logging import exception +import io +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException + +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget + +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity + ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + + +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") +@pytest.mark.suiteA +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") + @pytest.mark.sg123 + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + def test_ClientConnectivity_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4710", name="WIFI-4710") + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + def test_ClientConnectivity_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4715", name="WIFI-4715") + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + def test_ClientConnectivity_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + """ wpa2 enterprise 5g + pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, + connData) + + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4714", name="WIFI-4714") + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + def test_ClientConnectivity_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + , setup_perfectoMobile_iOS, radius_info, get_ap_logs): + + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssidName = profile_data["ssid_name"] + # ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + # print ("SSID_PASS: " + ssidPassword) + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + get_vif_state.append(ssidName) + if ssidName not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + + if is_internet: + if ip: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) + assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + else: + allure.attach(name="Connection Status: ", body=str("No Internet access")) + assert False From 54c18dbda642054e805863c288a124d072abb94b Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:38:21 +0530 Subject: [PATCH 29/36] Fix in eap testcas Signed-off-by: saurabh --- .../client_connect_test/iOS/test_enterprise_ttls.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py index 5772a7499..5247b85f1 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -39,7 +39,7 @@ setup_params_enterprise = { } -@allure.suite(suite_name="interop") +@allure.suite(suite_name="interop sanity") @allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") @pytest.mark.suiteA @pytest.mark.parametrize( @@ -57,7 +57,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -97,7 +97,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] @@ -134,7 +134,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -174,7 +174,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] From f913b98e70c993918b9ec3e8c164305a44e26695 Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:39:13 +0530 Subject: [PATCH 30/36] Changes in naming convention Signed-off-by: saurabh --- .../iOS/test_general_security_modes.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py index 77ce5a014..c2adf6c0e 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py @@ -59,7 +59,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, + def test_ClientConnect_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] @@ -92,7 +92,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -125,7 +125,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnect_5g_WPA(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -158,7 +158,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnect_2g_WPA(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -191,7 +191,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnect_5g_Open(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -230,7 +230,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.twog @pytest.mark.open - def test_ClientConnect_2g_Open(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] @@ -304,7 +304,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.fiveg @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] ssidName = profile_data["ssid_name"] @@ -338,7 +338,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.twog @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] ssidName = profile_data["ssid_name"] @@ -372,7 +372,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.fiveg @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] ssidName = profile_data["ssid_name"] @@ -406,7 +406,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.twog @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] ssidName = profile_data["ssid_name"] @@ -440,7 +440,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.fiveg @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] ssidName = profile_data["ssid_name"] @@ -475,7 +475,7 @@ class TestBridgeModeConnectSuiteTwo(object): @pytest.mark.twog @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] ssidName = profile_data["ssid_name"] From 9aaa52085f30df6cb2e5acb5e8af9e2d76a99f9a Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:40:01 +0530 Subject: [PATCH 31/36] Added client connectivity testcasses for eap ios Signed-off-by: saurabh --- .../iOS/test_enterprise_ttls.py | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py index 55b338cac..65a6980ea 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -39,8 +39,8 @@ setup_params_enterprise = { } -@allure.suite(suite_name="interop") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") +@allure.suite(suite_name="interop sanity") +@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") @pytest.mark.suiteA @pytest.mark.parametrize( 'setup_profiles', @@ -55,7 +55,6 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") - @pytest.mark.sg123 @pytest.mark.wpa2_enterprise @pytest.mark.fiveg def test_ClientConnectivity_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data @@ -65,7 +64,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): """ profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] + ssidPassword = ["BLANK"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) ttls_passwd = radius_info["password"] @@ -80,8 +79,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): connData = get_ToggleAirplaneMode_data # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) + ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) if is_internet: if ip: @@ -91,9 +89,9 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword,setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @@ -106,6 +104,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -131,9 +130,9 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @@ -148,6 +147,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): """ profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -174,9 +174,9 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False @@ -189,6 +189,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -214,9 +215,9 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): print(text_body) allure.attach(name="Connection Status: ", body=str(text_body)) - wifi_connect_eap(request, ssidName, ttls_passwd, setup_perfectoMobile_iOS, connData) + wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False From 787a023695b6ec4fc87e06479f83191c6beee0f4 Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:40:23 +0530 Subject: [PATCH 32/36] Added client connect testcasses for eap ios Signed-off-by: saurabh --- .../iOS/test_enterprise_ttls.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py index 5247b85f1..1126f2b95 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py @@ -22,10 +22,10 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti verifyUploadDownloadSpeediOS, get_ip_address_eap_ios pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] setup_params_enterprise = { - "mode": "BRIDGE", + "mode": "NAT", "ssid_modes": { "wpa2_enterprise": [ {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, @@ -40,7 +40,7 @@ setup_params_enterprise = { @allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") +@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-A") @pytest.mark.suiteA @pytest.mark.parametrize( 'setup_profiles', @@ -49,18 +49,18 @@ setup_params_enterprise = { scope="class" ) @pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): +class TestNatModeEnterpriseTTLSSuiteA(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + pytest -m "client_connect and nat and enterprise and ttls and interop and suiteA" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4697", name="WIFI-4697") @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" """ profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] @@ -94,10 +94,10 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4696", name="WIFI-4696") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] @@ -131,13 +131,13 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4701", name="WIFI-4701") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" """ profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] @@ -171,10 +171,10 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4700", name="WIFI-4700") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnect_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] From 4780e2fd76de101667cfe53e5b99837ea39c877e Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:42:37 +0530 Subject: [PATCH 33/36] Added jira links Signed-off-by: saurabh --- .../iOS/test_general_security_modes.py | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py index 4e9b123b3..911292828 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py @@ -57,9 +57,10 @@ class TestNatModeConnectSuiteOne(object): pytest -m "client_connect and nat and InteropsuiteA" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4501", name="WIFI-4502") @pytest.mark.fiveg @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, + def test_ClientConnect_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] @@ -90,9 +91,10 @@ class TestNatModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4485", name="WIFI-4485") @pytest.mark.twog @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssidName = profile_data["ssid_name"] @@ -123,9 +125,10 @@ class TestNatModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4484", name="WIFI-4484") @pytest.mark.fiveg @pytest.mark.wpa - def test_ClientConnect_5g_WPA(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_WPA_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][1] ssidName = profile_data["ssid_name"] @@ -156,9 +159,10 @@ class TestNatModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4483", name="WIFI-4483") @pytest.mark.twog @pytest.mark.wpa - def test_ClientConnect_2g_WPA(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_WPA_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["wpa"][0] ssidName = profile_data["ssid_name"] @@ -189,9 +193,10 @@ class TestNatModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4482", name="WIFI-4482") @pytest.mark.fiveg @pytest.mark.open - def test_ClientConnect_5g_Open(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][1] ssidName = profile_data["ssid_name"] @@ -228,9 +233,10 @@ class TestNatModeConnectSuiteOne(object): #ForgetWifi # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4481", name="WIFI-4481") @pytest.mark.twog @pytest.mark.open - def test_ClientConnect_2g_Open(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general["ssid_modes"]["open"][0] ssidName = profile_data["ssid_name"] @@ -302,9 +308,10 @@ class TestNatModeConnectSuiteTwo(object): pytest -m "client_connect and nat and InteropsuiteB" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4529", name="WIFI-4529") @pytest.mark.fiveg @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] ssidName = profile_data["ssid_name"] @@ -336,9 +343,10 @@ class TestNatModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4532", name="WIFI-4532") @pytest.mark.twog @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] ssidName = profile_data["ssid_name"] @@ -370,9 +378,10 @@ class TestNatModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4532", name="WIFI-4532") @pytest.mark.fiveg @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] ssidName = profile_data["ssid_name"] @@ -404,9 +413,10 @@ class TestNatModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4529", name="WIFI-4529") @pytest.mark.twog @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] ssidName = profile_data["ssid_name"] @@ -438,9 +448,10 @@ class TestNatModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4538", name="WIFI-4538") @pytest.mark.fiveg @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] ssidName = profile_data["ssid_name"] @@ -472,10 +483,10 @@ class TestNatModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4537", name="WIFI-4537") @pytest.mark.twog @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): + def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] ssidName = profile_data["ssid_name"] From 561ba21bcf10a7a1dd834fe38bb8d3c45ab0867f Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:43:13 +0530 Subject: [PATCH 34/36] Added client connect testcasses for eap nat ios Signed-off-by: saurabh --- .../iOS/test_enterprise_ttls.py | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py index 4e82088c8..83b3b67e5 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py @@ -22,10 +22,10 @@ from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnecti verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] + ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] setup_params_enterprise = { - "mode": "BRIDGE", + "mode": "NAT", "ssid_modes": { "wpa2_enterprise": [ {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, @@ -40,7 +40,7 @@ setup_params_enterprise = { @allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") +@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") @pytest.mark.suiteA @pytest.mark.parametrize( 'setup_profiles', @@ -49,22 +49,22 @@ setup_params_enterprise = { scope="class" ) @pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): +class TestNatModeEnterpriseTTLSSuiteA(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" + pytest -m "client_connect and nat and enterprise and ttls and interop and suiteA" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") - @pytest.mark.sg123 + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4717", name="WIFI-4717") @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" """ profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -92,19 +92,20 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4710", name="WIFI-4710") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4716", name="WIFI-4716") @pytest.mark.twog @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -132,21 +133,22 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4715", name="WIFI-4715") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4721", name="WIFI-4721") @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" + pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" """ profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -175,19 +177,20 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4714", name="WIFI-4714") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4720", name="WIFI-4720") @pytest.mark.twog @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data + def test_ClientConnectivity_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data , setup_perfectoMobile_iOS, radius_info, get_ap_logs): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssidName = profile_data["ssid_name"] + ssidPassword = ["BLANK"] # ssidPassword = profile_data["security_key"] print("SSID_NAME: " + ssidName) # print ("SSID_PASS: " + ssidPassword) @@ -215,7 +218,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, setup_perfectoMobile_iOS, connData) + wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) else: allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False From 385abd7e729e369a3301fb85f8a4f1fddf29fb10 Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:55:49 +0530 Subject: [PATCH 35/36] Added jira links Signed-off-by: saurabh --- .../iOS/test_general_security_modes.py | 62 ++++--------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py index c2adf6c0e..682a75396 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py @@ -57,6 +57,7 @@ class TestBridgeModeConnectSuiteOne(object): pytest -m "client_connect and bridge and InteropsuiteA" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4545", name="WIFI-4545") @pytest.mark.fiveg @pytest.mark.wpa2_personal def test_ClientConnect_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, @@ -90,6 +91,7 @@ class TestBridgeModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4490", name="WIFI-4490") @pytest.mark.twog @pytest.mark.wpa2_personal def test_ClientConnect_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -123,6 +125,7 @@ class TestBridgeModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4489", name="WIFI-4489") @pytest.mark.fiveg @pytest.mark.wpa def test_ClientConnect_5g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -156,6 +159,7 @@ class TestBridgeModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4488", name="WIFI-4488") @pytest.mark.twog @pytest.mark.wpa def test_ClientConnect_2g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -189,6 +193,7 @@ class TestBridgeModeConnectSuiteOne(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4487", name="WIFI-4487") @pytest.mark.fiveg @pytest.mark.open def test_ClientConnect_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -228,6 +233,7 @@ class TestBridgeModeConnectSuiteOne(object): #ForgetWifi # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4486", name="WIFI-4486") @pytest.mark.twog @pytest.mark.open def test_ClientConnect_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -302,6 +308,7 @@ class TestBridgeModeConnectSuiteTwo(object): pytest -m "client_connect and bridge and InteropsuiteB" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4547", name="WIFI-4547") @pytest.mark.fiveg @pytest.mark.wpa3_personal def test_ClientConnect_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -336,6 +343,7 @@ class TestBridgeModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4546", name="WIFI-4546") @pytest.mark.twog @pytest.mark.wpa3_personal def test_ClientConnect_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -370,6 +378,7 @@ class TestBridgeModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4549", name="WIFI-4549") @pytest.mark.fiveg @pytest.mark.wpa3_personal_mixed def test_ClientConnect_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -404,6 +413,7 @@ class TestBridgeModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4548", name="WIFI-4548") @pytest.mark.twog @pytest.mark.wpa3_personal_mixed def test_ClientConnect_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -438,6 +448,7 @@ class TestBridgeModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4551", name="WIFI-4551") @pytest.mark.fiveg @pytest.mark.wpa_wpa2_personal_mixed def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -472,7 +483,7 @@ class TestBridgeModeConnectSuiteTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4550", name="WIFI-4550") @pytest.mark.twog @pytest.mark.wpa_wpa2_personal_mixed def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -506,52 +517,3 @@ class TestBridgeModeConnectSuiteTwo(object): else: allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - - -# @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# class TestAccessPointConnectivetyBridge(object): -# -# @pytest.mark.fiveg -# @pytest.mark.open -# @pytest.mark.sushant -# def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_iOS): -# profile_data = setup_params_general["ssid_modes"]["open"][1] -# ssidName = profile_data["ssid_name"] -# ssidPassword = "[BLANK]" -# print("SSID_NAME: " + ssidName) -# # print ("SSID_PASS: " + ssidPassword) -# -# # if ssidName not in get_vif_state: -# # allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) -# # pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") -# -# report = setup_perfectoMobile_iOS[1] -# driver = setup_perfectoMobile_iOS[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# # set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) -# -# # Need An ip To ping -# # wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) -# wifi_ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) -# print(wifi_ip) -# print(is_internet) -# assert wifi_ip -# # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) -# -# # # Open Ping Application -# # openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) -# # -# # ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) -# -# # ForgetWifi -# # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file From 50f526460ef8337c4aebf9da343961ad8500494c Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 11 Oct 2021 19:55:58 +0530 Subject: [PATCH 36/36] Added jira links Signed-off-by: saurabh --- .../iOS/test_general_security_modes.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py index 6dc8dd7af..efaa7fd8d 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py @@ -57,6 +57,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): pytest -m "client_connectivity and bridge and InteropsuiteA" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4557", name="WIFI-4557") @pytest.mark.fiveg @pytest.mark.wpa2_personal def test_ClientConnectivity_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, @@ -93,6 +94,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4556", name="WIFI-4556") @pytest.mark.twog @pytest.mark.wpa2_personal def test_ClientConnectivity_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -128,6 +130,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4555", name="WIFI-4555") @pytest.mark.fiveg @pytest.mark.wpa def test_ClientConnectivity_5g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -163,6 +166,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4554", name="WIFI-4554") @pytest.mark.twog @pytest.mark.wpa def test_ClientConnectivity_2g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -198,6 +202,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4553", name="WIFI-4553") @pytest.mark.fiveg @pytest.mark.open def test_ClientConnectivity_5g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -233,6 +238,7 @@ class TestBridgeModeConnectivitySuiteOneBridge(object): allure.attach(name="Connection Status: ", body=str("No Internet access")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4552", name="WIFI-4552") @pytest.mark.twog @pytest.mark.open def test_ClientConnectivity_2g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -309,6 +315,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): pytest -m "client_connectivity and bridge and InteropsuiteB" """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4559", name="WIFI-4559") @pytest.mark.fiveg @pytest.mark.wpa3_personal def test_ClientConnectivity_5g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -343,6 +350,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4558", name="WIFI-4558") @pytest.mark.twog @pytest.mark.wpa3_personal def test_ClientConnectivity_2g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -377,6 +385,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4561", name="WIFI-4561") @pytest.mark.fiveg @pytest.mark.wpa3_personal_mixed def test_ClientConnectivity_5g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -411,6 +420,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4560", name="WIFI-4560") @pytest.mark.twog @pytest.mark.wpa3_personal_mixed def test_ClientConnectivity_2g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -445,6 +455,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4563", name="WIFI-4563") @pytest.mark.fiveg @pytest.mark.wpa_wpa2_personal_mixed def test_ClientConnectivity_5g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): @@ -480,7 +491,7 @@ class TestBridgeModeConnectivitySuiteBridgeTwo(object): allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False - + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4562", name="WIFI-4562") @pytest.mark.twog @pytest.mark.wpa_wpa2_personal_mixed def test_ClientConnectivity_2g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):