Merge branch 'staging-wifi-1960' of github.com:Telecominfraproject/wlan-testing into staging-wifi-1960

This commit is contained in:
tushar.metkar
2021-05-24 19:21:09 -04:00
18 changed files with 3615 additions and 1350 deletions

View File

@@ -507,6 +507,7 @@ class ProfileUtility:
# wpa personal
def create_wpa_ssid_profile(self, profile_data=None):
self.get_default_profiles()
try:
if profile_data is None:
return False
@@ -619,18 +620,18 @@ class ProfileUtility:
profile = False
return profile
# wpa enterprise
# wpa enterprise done
def create_wpa_enterprise_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
return False
default_profile = self.default_profiles['ssid']
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
default_profile._name = profile_data['profile_name']
default_profile._details['vlanId'] = profile_data['vlan']
default_profile._details['ssid'] = profile_data['ssid_name']
default_profile._details['forwardMode'] = profile_data['mode']
print("shivams", self.profile_creation_ids["radius"][0])
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
default_profile._details['secureMode'] = 'wpaRadius'
@@ -643,7 +644,7 @@ class ProfileUtility:
profile = False
return profile
# wpa wpa2 enterprise mixed mode
# wpa wpa2 enterprise mixed mode done
def create_wpa_wpa2_enterprise_mixed_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
@@ -657,7 +658,7 @@ class ProfileUtility:
default_profile._details['forwardMode'] = profile_data['mode']
default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0]
default_profile._child_profile_ids = self.profile_creation_ids["radius"]
default_profile._details['secureMode'] = 'wpa2OnlyRadius'
default_profile._details['secureMode'] = 'wpa2Radius'
profile = self.profile_client.create_profile(body=default_profile)
profile_id = profile._id
self.profile_creation_ids['ssid'].append(profile_id)
@@ -714,7 +715,7 @@ class ProfileUtility:
profile = False
return profile
# wpa3 enterprise mixed mode
# wpa3 enterprise mixed mode done
def create_wpa3_enterprise_mixed_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
@@ -737,6 +738,47 @@ class ProfileUtility:
profile = False
return profile
# wpa3 enterprise mixed mode done
def create_wep_ssid_profile(self, profile_data=None):
try:
if profile_data is None:
return False
default_profile = self.default_profiles['ssid']
default_profile._details['appliedRadios'] = profile_data["appliedRadios"]
default_profile._name = profile_data['profile_name']
default_profile._details['vlanId'] = profile_data['vlan']
default_profile._details['ssid'] = profile_data['ssid_name']
default_profile._details['forwardMode'] = profile_data['mode']
default_profile._details['secureMode'] = 'wep'
default_profile._details['wepConfig'] = {}
default_profile._details['wepConfig']["model_type"] = "WepConfiguration"
default_profile._details['wepConfig']["wepAuthType"] = "open"
default_profile._details['wepConfig']["primaryTxKeyId"] = profile_data["default_key_id"]
default_profile._details['wepConfig']["wepKeys"] = [{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'},
{'model_type': 'WepKey',
'txKey': profile_data["wep_key"],
'txKeyConverted': None,
'txKeyType': 'wep64'}]
profile = self.profile_client.create_profile(body=default_profile)
profile_id = profile._id
self.profile_creation_ids['ssid'].append(profile_id)
self.profile_ids.append(profile_id)
except Exception as e:
print(e)
profile = False
return profile
"""
method call: used to create a ap profile that contains the given ssid profiles
"""
@@ -765,6 +807,7 @@ class ProfileUtility:
def create_radius_profile(self, radius_info=None):
default_profile = self.default_profiles['radius']
default_profile._name = radius_info['name']
default_profile._details['primaryRadiusAuthServer'] = {}
default_profile._details['primaryRadiusAuthServer']['ipAddress'] = radius_info['ip']
default_profile._details['primaryRadiusAuthServer']['port'] = radius_info['port']
default_profile._details['primaryRadiusAuthServer']['secret'] = radius_info['secret']
@@ -991,7 +1034,7 @@ class FirmwareUtility(JFrogUtility):
if __name__ == '__main__':
controller = {
'url': "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", # API base url for the controller
'url': "https://wlan-portal-svc-digicert.cicd.lab.wlan.tip.build", # API base url for the controller
'username': 'support@example.com',
'password': 'support',
'version': "1.1.0-SNAPSHOT",
@@ -999,6 +1042,18 @@ if __name__ == '__main__':
}
api = Controller(controller_data=controller)
profile = ProfileUtility(sdk_client=api)
# print(profile.get_profile_by_name(profile_name="basic-ext-03-03-SSID-open-0-VLAN"))
profile.get_default_profiles()
profile_data = {
"profile_name": "ssid_wep_2g",
"ssid_name": "ssid_wep_2g",
"appliedRadios": ["is2dot4GHz"],
"default_key_id" : 1,
"wep_key" : 1234567890,
"vlan": 1,
"mode": "BRIDGE"
}
profile.create_wep_ssid_profile(profile_data=profile_data)
# print(profile.get_profile_by_name(profile_name="wpa_wpa2_eap"))
profile.get_default_profiles()
api.disconnect_Controller()

View File

@@ -304,8 +304,9 @@ FRAMEWORK MARKER LOGIC
@pytest.fixture(scope="session")
def get_security_flags():
# Add more classifications as we go
security = ["open", "wpa", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed",
"wpa2_enterprise", "wpa3_enterprise", "twog", "fiveg", "radius"]
security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", "wpa_wpa2_enterprise_mixed",
"wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed",
"wpa3_enterprise", "twog", "fiveg", "radius"]
yield security
@@ -318,7 +319,7 @@ def get_markers(request, get_security_flags):
for item in session.items:
for j in item.iter_markers():
markers.append(j.name)
# print(set(markers))
print(set(markers))
for i in security:
if set(markers).__contains__(i):
security_dict[i] = True
@@ -335,8 +336,6 @@ def test_access_point(testbed, get_apnos, get_configuration):
mgr_status = []
for access_point_info in get_configuration['access_point']:
ap_ssh = get_apnos(access_point_info)
ap_ssh.reboot()
time.sleep(100)
status = ap_ssh.get_manager_state()
if "ACTIVE" not in status:
time.sleep(30)

View File

@@ -0,0 +1,322 @@
import pytest
import allure
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterpriseSuiteA(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False
setup_params_enterprise_two = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterpriseSuiteB(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -34,7 +34,7 @@ class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
status_id=1,
@@ -48,7 +48,7 @@ class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
@@ -126,12 +126,12 @@ class TestSetupBridge(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupBridge(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,16 +153,14 @@ class TestSetupBridge(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
@@ -178,8 +176,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -201,12 +199,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.twog
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.twog
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_2g']:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_5g']:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -261,12 +259,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -277,12 +275,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestBridgeModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,179 +316,13 @@ class TestBridgeModeConnectivitySuiteTwo(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterprise(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False

View File

@@ -0,0 +1,162 @@
import pytest
import allure
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterprise(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -2,10 +2,10 @@ import allure
import pytest
import time
pytestmark = [pytest.mark.setup, pytest.mark.NAT, pytest.mark.sanity]
pytestmark = [pytest.mark.setup, pytest.mark.bridge, pytest.mark.sanity]
setup_params_general = {
"mode": "NAT",
"mode": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
@@ -22,7 +22,7 @@ setup_params_general = {
@pytest.mark.basic
@allure.feature("NAT MODE SETUP")
@allure.feature("BRIDGE MODE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
@@ -30,11 +30,11 @@ setup_params_general = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupNAT(object):
class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
status_id=1,
@@ -48,7 +48,7 @@ class TestSetupNAT(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
@@ -126,12 +126,12 @@ class TestSetupNAT(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupNAT(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,21 +153,19 @@ class TestSetupNAT(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_general_two = {
"mode": "NAT",
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
@@ -178,8 +176,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -187,7 +185,7 @@ setup_params_general_two = {
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_two],
@@ -195,18 +193,18 @@ setup_params_general_two = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeConnectivitySuiteTwo(object):
class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestNATModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.twog
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_2g']:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestNATModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_5g']:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -258,15 +256,15 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.twog
def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -274,15 +272,15 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.fiveg
def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestNATModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,178 +316,13 @@ class TestNATModeConnectivitySuiteTwo(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_enterprise = {
"mode": "NAT",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("NAT MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupNATEnterprise(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False

View File

@@ -0,0 +1,162 @@
import pytest
import allure
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("BRIDGE MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupBridgeEnterprise(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False

View File

@@ -2,10 +2,10 @@ import allure
import pytest
import time
pytestmark = [pytest.mark.setup, pytest.mark.VLAN, pytest.mark.sanity]
pytestmark = [pytest.mark.setup, pytest.mark.bridge, pytest.mark.sanity]
setup_params_general = {
"mode": "VLAN",
"mode": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
@@ -22,7 +22,7 @@ setup_params_general = {
@pytest.mark.basic
@allure.feature("VLAN MODE SETUP")
@allure.feature("BRIDGE MODE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
@@ -30,11 +30,11 @@ setup_params_general = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupVLAN(object):
class TestSetupBridge(object):
@pytest.mark.open
@pytest.mark.twog
def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
status_id=1,
@@ -48,7 +48,7 @@ class TestSetupVLAN(object):
@pytest.mark.open
@pytest.mark.fiveg
def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
@@ -126,12 +126,12 @@ class TestSetupVLAN(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -140,12 +140,12 @@ class TestSetupVLAN(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -153,21 +153,19 @@ class TestSetupVLAN(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_general_two = {
"mode": "VLAN",
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
@@ -178,8 +176,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -187,7 +185,7 @@ setup_params_general_two = {
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_two],
@@ -195,18 +193,18 @@ setup_params_general_two = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeConnectivitySuiteTwo(object):
class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_2g']:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_2g']
else:
update_report.update_testrail(case_id=test_cases["open_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -216,12 +214,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['open_5g']:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['open_5g']
else:
update_report.update_testrail(case_id=test_cases["open_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -230,12 +228,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
@pytest.mark.twog
def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_2g']:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa_2g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -245,12 +243,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_5g']:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa_5g"],
update_report.update_testrail(case_id=test_cases["wpa3_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -258,15 +256,15 @@ class TestVLANModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.twog
def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
test_cases):
if setup_profiles['wpa2_personal_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_2g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_2g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -274,15 +272,15 @@ class TestVLANModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.fiveg
def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
test_cases):
if setup_profiles['wpa2_personal_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_personal_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_personal_5g"],
update_report.update_testrail(case_id=test_cases["wpa_wpa2_personal_mixed_5g_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -291,12 +289,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
update_report.update_testrail(case_id=test_cases["equipment_ap_bridge"],
status_id=5,
msg='Failed to create profile')
assert False
@@ -305,12 +303,12 @@ class TestVLANModeConnectivitySuiteTwo(object):
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifc"],
status_id=5,
msg='Failed to push profile')
assert False
@@ -318,178 +316,13 @@ class TestVLANModeConnectivitySuiteTwo(object):
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False
setup_params_enterprise = {
"mode": "VLAN",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@allure.feature("VLAN MODE ENTERPRISE SETUP")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestSetupVLANEnterprise(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
if setup_profiles['wpa2_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa2_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa2_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_2g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_2g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_2g"],
status_id=5,
msg='Failed to create profile')
assert False
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['wpa3_enterprise_5g']:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['wpa3_enterprise_5g']
else:
update_report.update_testrail(case_id=test_cases["wpa3_enterprise_5g"],
status_id=5,
msg='Failed to create profile')
assert False
def test_setup_equipment_ap_profile(self, setup_profiles, update_report,
test_cases):
if setup_profiles['equipment_ap']:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=1,
msg='profile created successfully')
assert setup_profiles['equipment_ap']
else:
update_report.update_testrail(case_id=test_cases["equipment_ap"],
status_id=5,
msg='Failed to create profile')
assert False
def test_verify_vif_config(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifc']:
update_report.update_testrail(case_id=test_cases["vifc"],
status_id=1,
msg='profile pushed successfully')
assert setup_profiles['vifc']
else:
update_report.update_testrail(case_id=test_cases["vifc"],
update_report.update_testrail(case_id=test_cases["bridge_vifs"],
status_id=5,
msg='Failed to push profile')
assert False
def test_verify_vif_state(self, setup_profiles, update_report,
test_cases):
if setup_profiles['vifs']:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=1,
msg='profile pushed successfully')
time.sleep(100)
assert setup_profiles['vifs']
else:
update_report.update_testrail(case_id=test_cases["vifs"],
status_id=5,
msg='Failed to push profile')
time.sleep(100)
assert False

View File

@@ -104,7 +104,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + testbed
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + testbed)
try:
# pass
instantiate_profile.create_radius_profile(radius_info=radius_info)
allure.attach(body=str(radius_info),
name="Radius Profile Created")
@@ -145,7 +144,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
test_cases["open_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa":
for j in profile_data["ssid"][mode]:
# print(j)
@@ -203,6 +201,34 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa_wpa2_personal_mixed":
for j in profile_data["ssid"][mode]:
# print(j)
if mode in get_markers.keys() and get_markers[mode]:
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(profile_data=j)
test_cases["wpa_wpa2_personal_mixed_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_wpa2_personal_mixed_2g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(profile_data=j)
test_cases["wpa_wpa2_personal_mixed_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_wpa2_personal_mixed_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa3_personal":
for j in profile_data["ssid"][mode]:
print(j)
@@ -238,7 +264,8 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(profile_data=j)
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
profile_data=j)
test_cases["wpa3_personal_mixed_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
@@ -250,7 +277,8 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(profile_data=j)
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
profile_data=j)
test_cases["wpa3_personal_mixed_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
@@ -260,7 +288,35 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa_enterprise":
for j in profile_data["ssid"][mode]:
if mode in get_markers.keys() and get_markers[mode]:
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
test_cases["wpa_enterprise_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_enterprise_2g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
test_cases["wpa_enterprise_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa_enterprise_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa2_enterprise":
for j in profile_data["ssid"][mode]:
# print(j)
@@ -289,7 +345,6 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
test_cases["wpa2_enterprise_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa3_enterprise":
for j in profile_data["ssid"][mode]:
# print(j)
@@ -319,6 +374,92 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa_wpa2_enterprise_mixed":
print("shivam", mode)
for j in profile_data["ssid"][mode]:
# print(j)
if mode in get_markers.keys() and get_markers[mode]:
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_2g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wpa3_enterprise_mixed":
for j in profile_data["ssid"][mode]:
# print(j)
if mode in get_markers.keys() and get_markers[mode]:
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_2g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
if mode == "wep":
for j in profile_data["ssid"][mode]:
# print(j)
if mode in get_markers.keys() and get_markers[mode]:
try:
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_2g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_2g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
try:
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
j["appliedRadios"]):
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
test_cases["wpa3_enterprise_5g"] = True
allure.attach(body=str(creates_profile),
name="SSID Profile Created")
except Exception as e:
print(e)
test_cases["wpa3_enterprise_5g"] = False
allure.attach(body=str(e),
name="SSID Profile Creation Failed")
# Equipment AP Profile Creation
try:
instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap'])

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterpriseTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterpriseTLSSuiteTwo(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
setup_params_enterprise = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes

View File

@@ -1,7 +1,7 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "BRIDGE",
@@ -20,7 +20,6 @@ setup_params_general = {
}
@pytest.mark.basic
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -210,8 +209,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -237,7 +236,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
security = "wpa3"
mode = "BRIDGE"
band = "twog"
vlan = 1
@@ -264,7 +263,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
security = "wpa3"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
@@ -344,16 +343,18 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@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, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][0]
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -372,15 +373,17 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@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, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][1]
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "BRIDGE"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
@@ -397,21 +400,14 @@ class TestBridgeModeConnectivitySuiteTwo(object):
assert result
setup_params_enterprise = {
setup_params_wep = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -420,31 +416,28 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeEnterprise(object):
class TestBridgeModeWEP(object):
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
@@ -458,148 +451,21 @@ class TestBridgeModeEnterprise(object):
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_wep["ssid_modes"]["wep"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
setup_params_enterprise = {
"mode": "NAT",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterpriseTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "NAT",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterpriseTLSSuiteTwo(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
setup_params_enterprise = {
"mode": "NAT",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "NAT",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes

View File

@@ -1,7 +1,7 @@
import pytest
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "NAT",
@@ -33,81 +33,73 @@ class TestNATModeConnectivitySuiteOne(object):
@pytest.mark.open
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_open_ssid_2g(self, request, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases):
def test_open_ssid_2g(self, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog,
test_cases):
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security_key = "[BLANK]"
security = "open"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
# if result:
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
# status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
# passes))
# else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
# status_id=5,
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
# passes))
assert result
@pytest.mark.open
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_open_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_open_ssid_5g(self, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report):
profile_data = setup_params_general["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security_key = "[BLANK]"
security = "open"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
# if result:
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
# status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
# passes))
# else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
# status_id=5,
# msg='2G WPA Client Connectivity Failed - NAT mode' + str(
# passes))
assert result
@pytest.mark.wpa
@pytest.mark.twog
@allure.story('wpa 2.4 GHZ Band')
def test_wpa_ssid_2g(self, request, get_lanforge_data, update_report,
lf_test, test_cases):
lf_test, test_cases, station_names_twog):
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -124,90 +116,83 @@ class TestNATModeConnectivitySuiteOne(object):
@pytest.mark.wpa
@pytest.mark.fiveg
@allure.story('wpa 5 GHZ Band')
def test_wpa_ssid_5g(self, request, lf_test, update_report, test_cases, get_lanforge_data):
def test_wpa_ssid_5g(self, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data):
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["5g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
msg='5G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["5g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
msg='5G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert result
@pytest.mark.wpa2_personal
@pytest.mark.twog
@allure.story('wpa2_personal 2.4 GHZ Band')
def test_wpa2_personal_ssid_2g(self, request, get_lanforge_data, lf_test, update_report, test_cases):
def test_wpa2_personal_ssid_2g(self, get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["2g_wpa2_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
msg='2G WPA2 Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["2g_wpa2_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
msg='2G WPA2 Client Connectivity Failed - NAT mode' + str(
passes))
assert result
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@allure.story('wpa2_personal 5 GHZ Band')
def test_wpa2_personal_ssid_5g(self, request, get_lanforge_data, update_report, test_cases, lf_test):
def test_wpa2_personal_ssid_5g(self, get_lanforge_data, update_report, test_cases, station_names_fiveg,
lf_test):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["5g_wpa2_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
msg='5G WPA2 Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
update_report.update_testrail(case_id=test_cases["5g_wpa2_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
msg='5G WPA2 Client Connectivity Failed - NAT mode' + str(
passes))
assert result
@@ -224,8 +209,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -233,7 +218,6 @@ setup_params_general_two = {
}
@pytest.mark.shivam
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -247,21 +231,18 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_ssid_2g(self, request, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa3_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
security = "wpa3"
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -278,20 +259,17 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_wpa3_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
security = "wpa3"
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -308,21 +286,19 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_mixed_ssid_2g(self, request, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa3_personal_mixed_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa3"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -339,20 +315,18 @@ class TestNATModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_mixed_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_wpa3_personal_mixed_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa3"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
@@ -369,74 +343,71 @@ class TestNATModeConnectivitySuiteTwo(object):
@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, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][0]
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
mode = "BRIDGE"
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert result
@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, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][1]
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
mode = "BRIDGE"
security = "wpa"
extra_secu = ["wpa2"]
mode = "NAT"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert result
setup_params_enterprise = {
setup_params_wep = {
"mode": "NAT",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -445,186 +416,56 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestNATModeEnterprise(object):
class TestNATModeWEP(object):
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
profile_data = setup_params_wep["ssid_modes"]["wep"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],
status_id=5,
msg='2G WPA Client Connectivity Failed - NAT mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"],

View File

@@ -0,0 +1,425 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.sanity]
setup_params_enterprise = {
"mode": "VLAN",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterpriseTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "VLAN",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterpriseTLSSuiteTwo(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes

View File

@@ -0,0 +1,366 @@
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.ttls,
pytest.mark.sanity]
setup_params_enterprise = {
"mode": "VLAN",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
setup_params_enterprise_two = {
"mode": "VLAN",
"ssid_modes": {
"wpa_wpa2_enterprise_mixed": [
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
"wpa3_enterprise_mixed": [
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
},
"rf": {},
"radius": True
}
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise_two],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes

View File

@@ -1,7 +1,7 @@
import pytest
import allure
import pytest
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.sanity]
pytestmark = [pytest.mark.client_connectivity, pytest.mark.vlan, pytest.mark.general, pytest.mark.sanity]
setup_params_general = {
"mode": "VLAN",
@@ -28,86 +28,78 @@ setup_params_general = {
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeConnectivity(object):
class TestVLANModeConnectivitySuiteOne(object):
@pytest.mark.open
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_open_ssid_2g(self, setup_profiles, request, get_lanforge_data, lf_test, update_report, test_cases):
def test_open_ssid_2g(self, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog,
test_cases):
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security_key = "[BLANK]"
security = "open"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "twog"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
# if result:
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
# status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
# passes))
# else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
# status_id=5,
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
# passes))
assert result
@pytest.mark.open
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_open_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_open_ssid_5g(self, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report):
profile_data = setup_params_general["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security_key = "[BLANK]"
security = "open"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "fiveg"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
# if result:
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
# status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
# passes))
# else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
# status_id=5,
# msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
# passes))
assert result
@pytest.mark.wpa
@pytest.mark.twog
@allure.story('wpa 2.4 GHZ Band')
def test_wpa_ssid_2g(self, request, get_lanforge_data, update_report,
lf_test, test_cases):
lf_test, test_cases, station_names_twog):
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "twog"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
@@ -124,90 +116,83 @@ class TestVLANModeConnectivity(object):
@pytest.mark.wpa
@pytest.mark.fiveg
@allure.story('wpa 5 GHZ Band')
def test_wpa_ssid_5g(self, request, lf_test, update_report, test_cases, get_lanforge_data):
def test_wpa_ssid_5g(self, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data):
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "fiveg"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["5g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
msg='5G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["5g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
msg='5G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert result
@pytest.mark.wpa2_personal
@pytest.mark.twog
@allure.story('wpa2_personal 2.4 GHZ Band')
def test_wpa2_personal_ssid_2g(self, request, get_lanforge_data, lf_test, update_report, test_cases):
def test_wpa2_personal_ssid_2g(self, get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_2dot4g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "twog"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["2g_wpa2_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
msg='2G WPA2 Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["2g_wpa2_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
msg='2G WPA2 Client Connectivity Failed - VLAN mode' + str(
passes))
assert result
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@allure.story('wpa2_personal 5 GHZ Band')
def test_wpa2_personal_ssid_5g(self, request, get_lanforge_data, update_report, test_cases, lf_test):
def test_wpa2_personal_ssid_5g(self, get_lanforge_data, update_report, test_cases, station_names_fiveg,
lf_test):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "fiveg"
vlan = 100
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["5g_wpa2_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
msg='5G WPA2 Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
update_report.update_testrail(case_id=test_cases["5g_wpa2_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
msg='5G WPA2 Client Connectivity Failed - VLAN mode' + str(
passes))
assert result
@@ -224,8 +209,8 @@ setup_params_general_two = {
{"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa_wpa2_personal_mixed": [
{"ssid_name": "ssid_wpa_wpa3_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa3_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]
},
"rf": {},
@@ -233,7 +218,6 @@ setup_params_general_two = {
}
@pytest.mark.shivam
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -252,7 +236,7 @@ class TestVLANModeConnectivitySuiteTwo(object):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
security = "wpa3"
mode = "VLAN"
band = "twog"
vlan = 1
@@ -275,20 +259,17 @@ class TestVLANModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_wpa3_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
security = "wpa3"
mode = "VLAN"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
@@ -334,20 +315,18 @@ class TestVLANModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_mixed_ssid_5g(self, request, get_lanforge_data, lf_test, test_cases, update_report):
def test_wpa3_personal_mixed_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa3"
station_names = []
for i in range(0, int(request.config.getini("num_stations"))):
station_names.append(get_lanforge_data["lanforge_5g_prefix"] + "0" + str(i))
mode = "VLAN"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names, vlan_id=vlan)
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
@@ -364,74 +343,71 @@ class TestVLANModeConnectivitySuiteTwo(object):
@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, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][0]
def test_wpa_wpa2_personal_ssid_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
mode = "BRIDGE"
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "twog"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert result
@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, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa3_personal_mixed"][1]
def test_wpa_wpa2_personal_ssid_5g(self, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = ["wpa3"]
mode = "BRIDGE"
security = "wpa"
extra_secu = ["wpa2"]
mode = "VLAN"
band = "fiveg"
vlan = 1
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if result:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert result
setup_params_enterprise = {
setup_params_wep = {
"mode": "VLAN",
"ssid_modes": {
"wpa_enterprise": [
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa2_enterprise": [
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}],
"wpa3_enterprise": [
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["is2dot4GHz"], "default_key_id": 1,
"wep_key": 1234567890},
{"ssid_name": "ssid_wep_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"default_key_id": 1, "wep_key": 1234567890}]
},
"rf": {},
"radius": True
}
@@ -440,186 +416,56 @@ setup_params_enterprise = {
@pytest.mark.enterprise
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_enterprise],
[setup_params_wep],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestVLANModeEnterprise(object):
class TestVLANModeWEP(object):
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.twog
def test_wpa_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wep_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
profile_data = setup_params_wep["ssid_modes"]["wep"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa_enterprise
@pytest.mark.wep
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wep_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
profile_data = setup_params_wep["ssid_modes"]["wep"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"],
status_id=5,
msg='2G WPA Client Connectivity Failed - bridge mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
wep_key = "[BLANK]"
security = "open"
extra_secu = []
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "twog"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_twog, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=1,
msg='2G WPA Client Connectivity Passed successfully - VLAN mode' + str(
passes))
else:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],
status_id=5,
msg='2G WPA Client Connectivity Failed - VLAN mode' + str(
passes))
assert passes
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
ttls_passwd = radius_info["password"]
eap = "TTLS"
identity = radius_info['user']
passes = lf_test.EAP_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
eap=eap, ttls_passwd=ttls_passwd, identity=identity,
station_name=station_names_fiveg, vlan_id=vlan)
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
passkey=wep_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if passes:
update_report.update_testrail(case_id=test_cases["2g_wpa_VLAN"],