mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2026-01-27 10:23:37 +00:00
Wifi 7409 (#440)
* Added Enterpise mixed mode testcases in Bridge mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Enterpise mixed mode testcases in Nat mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Enterpise mixed mode testcases in Vlan mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Enterpise mixed mode jira links to testcases in Bridge mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Enterpise mixed mode jira links to testcases in Nat mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Enterpise mixed mode jira links to testcases in Vlan mode of client connect Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Changed ssid names in Setup profiles of bridge mode in Eap Suite B Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Changed ssid names in Setup profiles of nat mode in Eap Suite B Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Changed ssid names in Setup profiles of vlan mode in Eap Suite B Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
This commit is contained in:
@@ -277,6 +277,203 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
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_enterprise_two = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa_wpa2_enterprise_mixed": [
|
||||
{"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa3_enterprise_mixed": [
|
||||
{"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
class TestUniqueSSIDBridgeEnterpriseTwoAnd(object):
|
||||
|
||||
@pytest.mark.unique_ssid_enterprise_two_bridge_and
|
||||
def test_unique_ssid_bridge_and(self):
|
||||
for sec_modes in setup_params_enterprise_two['ssid_modes'].keys():
|
||||
for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])):
|
||||
N = 3
|
||||
rand_string = (''.join(random.choices(string.ascii_uppercase +
|
||||
string.digits, k=N))) + str(int(time.time_ns()) % 10000)
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string
|
||||
assert True
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-B")
|
||||
@pytest.mark.suiteB
|
||||
@pytest.mark.mixed_eap
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
|
||||
""" SuiteA Enterprise Test Cases
|
||||
pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB"
|
||||
"""
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7410", name="WIFI-7410")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7409", name="WIFI-7409")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Bridge(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7412", name="WIFI-7412")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa3_enterprise_mixed_Bridge(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7412", name="WIFI-7412")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa3_enterprise_mixed_Bridge(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
@@ -281,6 +281,203 @@ class TestNatModeEnterpriseTTLSSuiteA(object):
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
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_enterprise_two = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa_wpa2_enterprise_mixed": [
|
||||
{"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}],
|
||||
"wpa3_enterprise_mixed": [
|
||||
{"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
class TestUniqueSSIDNatEnterpriseTwoAnd(object):
|
||||
|
||||
@pytest.mark.unique_ssid_enterprise_two_nat_and
|
||||
def test_unique_ssid_nat_and(self):
|
||||
for sec_modes in setup_params_enterprise_two['ssid_modes'].keys():
|
||||
for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])):
|
||||
N = 3
|
||||
rand_string = (''.join(random.choices(string.ascii_uppercase +
|
||||
string.digits, k=N))) + str(int(time.time_ns()) % 10000)
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string
|
||||
assert True
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-B")
|
||||
@pytest.mark.suiteB
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestNatModeEnterpriseTTLSSuiteTwo(object):
|
||||
""" SuiteA Enterprise Test Cases
|
||||
pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB"
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7418", name="WIFI-7418")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7417", name="WIFI-7417")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Nat(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7420", name="WIFI-7420")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa3_enterprise_mixed_Nat(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7419", name="WIFI-7419")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa3_enterprise_mixed_Nat(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
@@ -287,6 +287,203 @@ class TestVlanModeEnterpriseTTLSSuiteA(object):
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
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_enterprise_two = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_wpa2_enterprise_mixed": [
|
||||
{"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
|
||||
"wpa3_enterprise_mixed": [
|
||||
{"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": True
|
||||
}
|
||||
class TestUniqueSSIDVlanEnterpriseTwoAnd(object):
|
||||
|
||||
@pytest.mark.unique_ssid_enterprise_two_vlan_and
|
||||
def test_unique_ssid_vlan_and(self):
|
||||
for sec_modes in setup_params_enterprise_two['ssid_modes'].keys():
|
||||
for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])):
|
||||
N = 3
|
||||
rand_string = (''.join(random.choices(string.ascii_uppercase +
|
||||
string.digits, k=N))) + str(int(time.time_ns()) % 10000)
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \
|
||||
setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string
|
||||
assert True
|
||||
|
||||
|
||||
@allure.suite(suite_name="interop sanity")
|
||||
@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect: Suite-B")
|
||||
@pytest.mark.suiteB
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_enterprise_two],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestVlanModeEnterpriseTTLSSuiteTwo(object):
|
||||
""" SuiteA Enterprise Test Cases
|
||||
pytest -m "client_connect and bridge and enterprise and ttls and suiteB"
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7426", name="WIFI-7426")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7425", name="WIFI-7425")
|
||||
@pytest.mark.wpa_wpa2_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Vlan(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7428", name="WIFI-7428")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.twog
|
||||
def test_ClientConnect_2g_wpa3_enterprise_mixed_Vlan(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
if ip:
|
||||
if is_internet:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
|
||||
else:
|
||||
text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet")
|
||||
print(text_body)
|
||||
allure.attach(name="Connection Status: ", body=str(text_body))
|
||||
assert True
|
||||
else:
|
||||
allure.attach(name="Connection Status: ", body=str("Device is Unable to connect"))
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7420", name="WIFI-7420")
|
||||
@pytest.mark.wpa3_enterprise_mixed
|
||||
@pytest.mark.fiveg
|
||||
def test_ClientConnect_5g_wpa3_enterprise_mixed_Vlan(self, request, get_vif_state,
|
||||
get_ToggleAirplaneMode_data,
|
||||
setup_perfectoMobile_android, radius_info, get_ap_logs):
|
||||
|
||||
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
|
||||
ssidName = profile_data["ssid_name"]
|
||||
# ssidPassword = profile_data["security_key"]
|
||||
print("SSID_NAME: " + ssidName)
|
||||
# print ("SSID_PASS: " + ssidPassword)
|
||||
ttls_passwd = radius_info["password"]
|
||||
identity = radius_info['user']
|
||||
get_vif_state.append(ssidName)
|
||||
if ssidName not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
|
||||
report = setup_perfectoMobile_android[1]
|
||||
driver = setup_perfectoMobile_android[0]
|
||||
connData = get_ToggleAirplaneMode_data
|
||||
|
||||
# Set Wifi/AP Mode
|
||||
ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android,
|
||||
connData)
|
||||
|
||||
Reference in New Issue
Block a user