mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-12-28 00:15:18 +00:00
- added connectivity
Signed-off-by: Sushant Bawiskar <sushant.bawiskar@candelatech.com>
This commit is contained in:
committed by
Sushant Bawiskar
parent
2ce11b2b31
commit
895f63d6cd
@@ -17,7 +17,7 @@ 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.interop_uc_sanity, pytest.mark.bridge]
|
||||
|
||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and
|
||||
|
||||
@@ -38,7 +38,7 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-A")
|
||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-A")
|
||||
@pytest.mark.InteropsuiteA
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
@pytest.mark.parametrize(
|
||||
@@ -48,7 +48,7 @@ setup_params_general = {
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleAirplaneModeAndroidBridgeMode(object):
|
||||
class TestBridgeModeConnectSuiteOne(object):
|
||||
""" Client Connect SuiteA
|
||||
pytest -m "client_connect and bridge and InteropsuiteA"
|
||||
"""
|
||||
@@ -257,247 +257,242 @@ class TestToggleAirplaneModeAndroidBridgeMode(object):
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# setup_params_general_two = {
|
||||
# "mode": "BRIDGE",
|
||||
# "ssid_modes": {
|
||||
# "wpa3_personal": [
|
||||
# {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa3_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa_wpa2_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}]
|
||||
# },
|
||||
# "rf": {},
|
||||
# "radius": False
|
||||
# }
|
||||
#
|
||||
#
|
||||
# @allure.suite(suite_name="interop sanity")
|
||||
# @allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B")
|
||||
# @pytest.mark.InteropsuiteB
|
||||
# @allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
# @pytest.mark.parametrize(
|
||||
# 'setup_profiles',
|
||||
# [setup_params_general_two],
|
||||
# indirect=True,
|
||||
# scope="class"
|
||||
# )
|
||||
# @pytest.mark.usefixtures("setup_profiles")
|
||||
# class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
# """ Client Connect SuiteB
|
||||
# pytest -m "client_connect and bridge and InteropsuiteB"
|
||||
# """
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_2g(self, request, get_vif_state, 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 = "[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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_5g(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-B")
|
||||
@pytest.mark.InteropsuiteB
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectSuiteTwo(object):
|
||||
""" Client Connect SuiteA
|
||||
pytest -m "client_connect and bridge and InteropsuiteB"
|
||||
"""
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa3_personal
|
||||
def test_ClientConnect_5g_wpa3_personal(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa3_personal
|
||||
def test_ClientConnect_2g_wpa3_personal(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
def test_ClientConnect_5g_wpa3_personal_mixed(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
def test_ClientConnect_2g_wpa3_personal_mixed(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
def test_ClientConnect_5g_wpa_wpa2_personal_mixed(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
def test_ClientConnect_2g_wpa_wpa2_personal_mixed(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
@@ -17,7 +17,7 @@ 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.BRIDGE]
|
||||
,pytest.mark.interop_uc_sanity, pytest.mark.bridge]
|
||||
|
||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \
|
||||
get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget
|
||||
@@ -49,9 +49,9 @@ setup_params_general = {
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleAirplaneModeAndroidBridgeMode(object):
|
||||
class TestBridgeModeConnectivitySuiteOne(object):
|
||||
""" Client Connect SuiteA
|
||||
pytest -m "client_connect and bridge and InteropsuiteA"
|
||||
pytest -m "client_connectivity and bridge and InteropsuiteA"
|
||||
"""
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@@ -277,247 +277,271 @@ class TestToggleAirplaneModeAndroidBridgeMode(object):
|
||||
allure.attach(name="Connection Status: ", body=str("No Internet access"))
|
||||
assert False
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# setup_params_general_two = {
|
||||
# "mode": "BRIDGE",
|
||||
# "ssid_modes": {
|
||||
# "wpa3_personal": [
|
||||
# {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa3_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa_wpa2_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}]
|
||||
# },
|
||||
# "rf": {},
|
||||
# "radius": False
|
||||
# }
|
||||
#
|
||||
#
|
||||
# @allure.suite(suite_name="interop sanity")
|
||||
# @allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B")
|
||||
# @pytest.mark.InteropsuiteB
|
||||
# @allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
# @pytest.mark.parametrize(
|
||||
# 'setup_profiles',
|
||||
# [setup_params_general_two],
|
||||
# indirect=True,
|
||||
# scope="class"
|
||||
# )
|
||||
# @pytest.mark.usefixtures("setup_profiles")
|
||||
# class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
# """ Client Connect SuiteB
|
||||
# pytest -m "client_connect and bridge and InteropsuiteB"
|
||||
# """
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_2g(self, request, get_vif_state, 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 = "[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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_5g(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B")
|
||||
@pytest.mark.InteropsuiteB
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
""" Client Connect SuiteB
|
||||
pytest -m "client_connect and bridge and InteropsuiteB"
|
||||
"""
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
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_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
|
||||
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][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_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
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('open 2.4 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
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_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
|
||||
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('open 5 GHZ Band')
|
||||
def test_wpa3_personal_mixed_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
|
||||
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][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_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
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_2g(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
def test_wpa_wpa2_personal_ssid_5g(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
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
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
|
||||
pytest.mark.AccessPointConnection]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.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.wpa2_personal
|
||||
def test_AccessPointConnection_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_AccessPointConnection_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_AccessPointConnection_5g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_AccessPointConnection_2g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
@pytest.mark.test_AccessPointConnection_5g_OPEN_Bridge_ios
|
||||
def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
@pytest.mark.test_AccessPointConnection_2g_OPEN_Bridge_ios
|
||||
def test_AccessPointConnection_2g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
@@ -0,0 +1,212 @@
|
||||
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.interop_ios, pytest.mark.ClientConnectivity]
|
||||
|
||||
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, \
|
||||
set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ClientConnectivity_2g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ClientConnectivity_5g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_ClientConnectivity_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
def test_ClientConnectivity_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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
@@ -0,0 +1,235 @@
|
||||
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
|
||||
from urllib3 import exceptions
|
||||
|
||||
import sys
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.PassPointConnection]
|
||||
|
||||
if 'perfecto_libs' not in sys.path:
|
||||
sys.path.append(f'../libs/perfecto_libs')
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestPassPointConnectionBridgeMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_PassPointConnection_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_PassPointConnection_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b.
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App.
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_PassPointConnection_2g_WPA_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_PassPointConnection_5g_WPA_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_open
|
||||
def test_PassPointConnection_5g_OPEN_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_PassPointConnection_2g_OPEN_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b.
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App.
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
@@ -0,0 +1,239 @@
|
||||
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')
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \
|
||||
verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
|
||||
pytest.mark.ToggleAirplaneMode]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleAirplaneModeBridgeMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleAirplaneMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleAirplaneMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ResultFlag: " + resultFlag)
|
||||
# print(resultFlag)
|
||||
# reportResultFlag.reportFlag = resultFlag
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleAirplaneMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleAirplaneMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_ToogleAirplaneMode_5g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_ToogleAirplaneMode_2g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
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.ios, pytest.mark.interop_ios,
|
||||
pytest.mark.ToggleWifiMode]
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \
|
||||
verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleWifiModeBridgeMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleWifiMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleWifiMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode.
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode.
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi.
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleWifiMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleWifiMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
def test_ToogleWifiMode_5g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_ToogleWifiMode_2g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
@@ -17,9 +17,9 @@ 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.interop_uc_sanity, pytest.mark.nat]
|
||||
|
||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and,get_all_available_ssids
|
||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
@@ -38,9 +38,9 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Nat Mode Client Connectivity : Suite-A")
|
||||
@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-A")
|
||||
@pytest.mark.InteropsuiteA
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
@allure.feature("NAT MODE CLIENT CONNECT")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
@@ -48,7 +48,7 @@ setup_params_general = {
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestClientConnectBridgeMode(object):
|
||||
class TestNatModeConnectSuiteOne(object):
|
||||
""" Client Connect SuiteA
|
||||
pytest -m "client_connect and nat and InteropsuiteA"
|
||||
"""
|
||||
@@ -218,11 +218,6 @@ class TestClientConnectBridgeMode(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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
@@ -233,21 +228,18 @@ class TestClientConnectBridgeMode(object):
|
||||
ssidPassword = "[BLANK]"
|
||||
print ("SSID_NAME: " + ssidName)
|
||||
print ("SSID_PASS: " + ssidPassword)
|
||||
print(get_vif_state)
|
||||
|
||||
# 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")
|
||||
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")
|
||||
|
||||
# print(get_all_available_ssids)
|
||||
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")
|
||||
@@ -261,246 +253,241 @@ class TestClientConnectBridgeMode(object):
|
||||
assert False
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
# setup_params_general_two = {
|
||||
# "mode": "NAT",
|
||||
# "ssid_modes": {
|
||||
# "wpa3_personal": [
|
||||
# {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa3_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}],
|
||||
# "wpa_wpa2_personal_mixed": [
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
# {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
# "security_key": "something"}]
|
||||
# },
|
||||
# "rf": {},
|
||||
# "radius": False
|
||||
# }
|
||||
#
|
||||
#
|
||||
# @allure.suite(suite_name="interop sanity")
|
||||
# @allure.sub_suite(sub_suite_name="Nat Mode Client Connectivity : Suite-B")
|
||||
# @pytest.mark.InteropsuiteB
|
||||
# @allure.feature("BRIDGE MODE CLIENT CONNECT")
|
||||
# @pytest.mark.parametrize(
|
||||
# 'setup_profiles',
|
||||
# [setup_params_general_two],
|
||||
# indirect=True,
|
||||
# scope="class"
|
||||
# )
|
||||
# @pytest.mark.usefixtures("setup_profiles")
|
||||
# class TestBridgeModeConnectivitySuiteTwo(object):
|
||||
# """ Client Connect SuiteB
|
||||
# pytest -m "client_connect and nat and InteropsuiteB"
|
||||
# """
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('open 2.4 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_2g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
|
||||
# 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_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
|
||||
#
|
||||
# @pytest.mark.wpa3_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('open 5 GHZ Band')
|
||||
# def test_wpa3_personal_mixed_ssid_5g(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||
#
|
||||
# profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.twog
|
||||
# @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_2g(self, request, get_vif_state, 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 = "[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_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
|
||||
#
|
||||
# @pytest.mark.wpa_wpa2_personal_mixed
|
||||
# @pytest.mark.fiveg
|
||||
# @allure.story('wpa wpa2 personal mixed 5 GHZ Band')
|
||||
# def test_wpa_wpa2_personal_ssid_5g(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
|
||||
|
||||
setup_params_general_two = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa3_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="NAT Mode Client Connect : Suite-B")
|
||||
@pytest.mark.InteropsuiteB
|
||||
@allure.feature("NAT MODE CLIENT CONNECT")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeConnectSuiteTwo(object):
|
||||
""" Client Connect SuiteA
|
||||
pytest -m "client_connect and nat and InteropsuiteB"
|
||||
"""
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa3_personal
|
||||
def test_ClientConnect_5g_wpa3_personal(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa3_personal
|
||||
def test_ClientConnect_2g_wpa3_personal(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
def test_ClientConnect_5g_wpa3_personal_mixed(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa3_personal_mixed
|
||||
def test_ClientConnect_2g_wpa3_personal_mixed(self, request, get_vif_state, 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)
|
||||
|
||||
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
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
def test_ClientConnect_5g_wpa_wpa2_personal_mixed(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
def test_ClientConnect_2g_wpa_wpa2_personal_mixed(self, request, get_vif_state, 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 = "[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_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
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
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
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.AccessPointConnection]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestAccessPointConnectivety(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_AccessPointConnection_5g_WPA2_Personal(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
#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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_AccessPointConnection_2g_WPA2_Personal(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
#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)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_AccessPointConnection_5g_WPA(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
#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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_AccessPointConnection_2g_WPA(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
#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)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
def test_AccessPointConnection_5g_OPEN(self, request, get_vif_state, get_AccessPointConn_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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_AccessPointConnection_2g_OPEN(self, request, get_vif_state, get_AccessPointConn_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_AccessPointConn_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)
|
||||
|
||||
# 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)
|
||||
@@ -0,0 +1,210 @@
|
||||
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.interop_ios, pytest.mark.ClientConnectivity]
|
||||
|
||||
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNatMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ClientConnectivity_5g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
#Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
#ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ClientConnectivity_2g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
#Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
#ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ClientConnectivity_2g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
#Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
#ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ClientConnectivity_5g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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)
|
||||
|
||||
#Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
#ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_ClientConnectivity_2g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
@pytest.mark.test_ClientConnectivity_5g_OPEN_ios
|
||||
def test_ClientConnectivity_5g_OPEN(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)
|
||||
|
||||
# Verify Upload download Speed from device Selection
|
||||
verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
# ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
@@ -0,0 +1,235 @@
|
||||
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
|
||||
from urllib3 import exceptions
|
||||
|
||||
import sys
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.PassPointConnection]
|
||||
|
||||
if 'perfecto_libs' not in sys.path:
|
||||
sys.path.append(f'../libs/perfecto_libs')
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestPassPointConnection(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_PassPointConnection_5g_WPA2_Personal(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_PassPointConnection_2g_WPA2_Personal(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b.
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App.
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_PassPointConnection_2g_WPA(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_PassPointConnection_5g_WPA(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
def test_PassPointConnection_5g_OPEN(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi.
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.Open
|
||||
def test_PassPointConnection_2g_OPEN(self, request, get_vif_state, setup_perfectoMobile_iOS,
|
||||
get_PassPointConniOS_data):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_PassPointConniOS_data
|
||||
|
||||
# Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b.
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle Airplane Mode and Ensure Wifi Connection.
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
# Close Settings App.
|
||||
closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS)
|
||||
@@ -0,0 +1,240 @@
|
||||
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')
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \
|
||||
verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
|
||||
pytest.mark.ToggleAirplaneMode]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleAirplaneMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleAirplaneMode_5g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag).
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode.
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleAirplaneMode_2g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ResultFlag: " + resultFlag)
|
||||
# print(resultFlag)
|
||||
# reportResultFlag.reportFlag = resultFlag
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleAirplaneMode_5g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleAirplaneMode_2g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_ToogleAirplaneMode_5g_OPEN(self, request, get_vif_state, get_ToggleAirplaneMode_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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_ToogleAirplaneMode_2g_OPEN(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
# print("ReportFlag: " + resultFlag)
|
||||
# setReportResultFlag(resultFlag)
|
||||
|
||||
# Toggle AirplaneMode
|
||||
Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
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.ios, pytest.mark.interop_ios,
|
||||
pytest.mark.ToggleWifiMode]
|
||||
|
||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \
|
||||
verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}],
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestToggleWifiMode(object):
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleWifiMode_5g_WPA2_Personal(self, request, get_vif_state, get_ToggleWifiMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa2_personal
|
||||
def test_ToogleWifiMode_2g_WPA2_Personal(self, request, get_vif_state, get_ToggleWifiMode_data,
|
||||
setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode.
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode.
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi.
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleWifiMode_5g_WPA(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.wpa
|
||||
def test_ToogleWifiMode_2g_WPA(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
ssidPassword = profile_data["security_key"]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.open
|
||||
def test_ToogleWifiMode_5g_OPEN(self, request, get_vif_state, get_ToggleWifiMode_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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.open
|
||||
def test_ToogleWifiMode_2g_OPEN(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
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_ToggleWifiMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Toggle WifiMode
|
||||
Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData)
|
||||
|
||||
# Verify AP After AirplaneMode.
|
||||
value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData)
|
||||
assert value
|
||||
|
||||
# ForgetWifi
|
||||
ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
|
||||
@@ -64,7 +64,7 @@ bundleId-iOS-Safari=com.apple.mobilesafari
|
||||
|
||||
# Android Device Capabilities
|
||||
platformName-android=Android
|
||||
model-android=Galaxy S9
|
||||
model-android=Galaxy S10.*
|
||||
appPackage-android=com.android.settings
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user