firmware url given from command line

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-06-05 18:55:38 +05:30
parent 796061c279
commit 18d92c3c6f
11 changed files with 338 additions and 243 deletions

View File

@@ -209,6 +209,7 @@ class Controller(ConfigureController):
payload = {}
headers = self.configuration.api_key_prefix
response = requests.request("GET", url, headers=headers, data=payload)
if response.status_code == 200:
status_data = response.json()
# print(status_data)
@@ -216,9 +217,10 @@ class Controller(ConfigureController):
current_ap_fw = status_data[2]['details']['reportedSwVersion']
# print(current_ap_fw)
return current_ap_fw
except:
except Exception as e:
print(e)
current_ap_fw = "error"
return False
return e
else:
return False
@@ -972,7 +974,6 @@ class FirmwareUtility:
exit()
if (force_upgrade is True) or (self.should_upgrade_ap_fw(equipment_id=equipment_id)):
firmware_id = self.upload_fw_on_cloud(force_upload=force_upload)
print(firmware_id)
time.sleep(5)
try:
obj = self.equipment_gateway_client.request_firmware_update(equipment_id=equipment_id,

View File

@@ -1,3 +1,17 @@
## Test Case Execution Suite
```commandline
pytest -m sanity -s -vvv --testbed=basic-01 -o build=<firmware URL>
pytest -m sanity_55 -s -vvv --testbed=basic-01 -o build=<firmware URL>
pytest -m performance -s -vvv --testbed=basic-01 -o build=<firmware URL>
pytest -m firmware -s -vvv --testbed=basic-01 -o build=<firmware URL>
```
## You can customize the markets with and/or/not logical options
## wlan-testing framework Information
**_pytest uses setup > test > tear_down_** <br>

View File

@@ -6,7 +6,10 @@ import sys
import os
import time
import allure
import logging
if "logs" not in os.listdir():
os.mkdir("logs/")
logging.basicConfig(level=logging.INFO, filename="logs/"+'{:%Y-%m-%d-%H-%M-%S}.log'.format(datetime.datetime.now()))
sys.path.append(
os.path.dirname(
os.path.realpath(__file__)
@@ -336,9 +339,19 @@ def check_ap_firmware_ssh(get_configuration):
@pytest.fixture(scope="session")
def setup_test_run(setup_controller, upgrade_firmware, check_ap_firmware_cloud, check_ap_firmware_ssh):
def setup_test_run(setup_controller, upgrade_firmware, get_configuration, get_equipment_id, get_latest_firmware,
get_apnos):
"""used to upgrade the firmware on AP and should be called on each test case on a module level"""
if check_ap_firmware_ssh == check_ap_firmware_cloud:
active_fw_list = []
try:
for access_point in get_configuration['access_point']:
ap_ssh = get_apnos(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = []
if active_fw_list == get_latest_firmware:
yield True
else:
pytest.exit("AP is not Upgraded tp Target Firmware versions")
@@ -397,7 +410,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

View File

@@ -123,7 +123,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
if parameter["radius"]:
radius_info = radius_info
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + testbed
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + testbed)
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
try:
instantiate_profile.create_radius_profile(radius_info=radius_info)
allure.attach(body=str(radius_info),

View File

@@ -1,5 +1,10 @@
import os
"""
Performance Test: Dataplane Throughput Test: Bridge Mode
pytest -m "dataplane_throughput_test and bridge"
"""
import os
import pytest
import allure
@@ -17,7 +22,6 @@ setup_params_general = {
}
@pytest.mark.basic
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -27,11 +31,17 @@ setup_params_general = {
)
@pytest.mark.usefixtures("setup_profiles")
class TestDataplaneThroughputBridge(object):
"""Dataplane THroughput Bridge Mode
pytest -m "dataplane_throughput_test and bridge"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Dataplane THroughput Bridge Mode
pytest -m "dataplane_throughput_test and bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
@@ -40,6 +50,9 @@ class TestDataplaneThroughputBridge(object):
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -65,7 +78,11 @@ class TestDataplaneThroughputBridge(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Dataplane THroughput Bridge Mode
pytest -m "dataplane_throughput_test and bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
@@ -74,6 +91,9 @@ class TestDataplaneThroughputBridge(object):
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)

View File

@@ -1,3 +1,9 @@
"""
Performance Test: Dataplane Throughput Test: nat Mode
pytest -m "dataplane_throughput_test and nat"
"""
import os
import pytest
import allure
@@ -16,7 +22,6 @@ setup_params_general = {
}
@pytest.mark.basic
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -26,11 +31,17 @@ setup_params_general = {
)
@pytest.mark.usefixtures("setup_profiles")
class TestDataplaneThroughputNAT(object):
"""Dataplane THroughput nat Mode
pytest -m "dataplane_throughput_test and nat"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, setup_profiles, lf_test, station_names_twog, get_configuration,
create_lanforge_chamberview_dut):
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Dataplane THroughput nat Mode
pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
@@ -39,6 +50,9 @@ class TestDataplaneThroughputNAT(object):
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -64,8 +78,11 @@ class TestDataplaneThroughputNAT(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, get_configuration,
create_lanforge_chamberview_dut):
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Dataplane THroughput nat Mode
pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
@@ -74,25 +91,27 @@ class TestDataplaneThroughputNAT(object):
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name)
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
entries = os.listdir("../reports/" + report_name + '/')
entries = os.listdir("../reports/"+report_name + '/')
pdf = False
for i in entries:
if ".pdf" in i:
pdf = i
if pdf:
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
name=get_configuration["access_point"][0]["model"] + "_dataplane")
allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False

View File

@@ -1,5 +1,10 @@
import os
"""
Performance Test: Dataplane Throughput Test: vlan Mode
pytest -m "dataplane_throughput_test and vlan"
"""
import os
import pytest
import allure
@@ -17,8 +22,6 @@ setup_params_general = {
}
@pytest.mark.basic
@pytest.mark.shivam
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
@@ -28,19 +31,28 @@ setup_params_general = {
)
@pytest.mark.usefixtures("setup_profiles")
class TestDataplaneThroughputVLAN(object):
"""Dataplane THroughput vlan Mode
pytest -m "dataplane_throughput_test and vlan"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, setup_profiles, lf_test, station_names_twog, get_configuration,
create_lanforge_chamberview_dut):
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Dataplane THroughput vlan Mode
pytest -m "dataplane_throughput_test and vlan and wpa2_personal and 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"
mode = "VLAN"
band = "twog"
vlan = 1
vlan = 100
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
@@ -66,35 +78,40 @@ class TestDataplaneThroughputVLAN(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, get_configuration,
create_lanforge_chamberview_dut):
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Dataplane THroughput vlan Mode
pytest -m "dataplane_throughput_test and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
vlan = 100
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name)
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
entries = os.listdir("../reports/" + report_name + '/')
entries = os.listdir("../reports/"+report_name + '/')
pdf = False
for i in entries:
if ".pdf" in i:
pdf = i
if pdf:
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
name=get_configuration["access_point"][0]["model"] + "_dataplane")
allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False

View File

@@ -1,66 +1,66 @@
"""
Performance : Wifi Capacity Test : Bridge Mode
"""
import pytest
import allure
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge]
setup_params_general = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@pytest.mark.basic
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestWifiCapacityBridgeMode(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security="wpa2", mode="BRIDGE", band="twog",
instance_name="wct_instance", )
assert PASS
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security=security, mode=mode, band=band,
instance_name="wct_instance", )
assert PASS
# """
# Performance : Wifi Capacity Test : Bridge Mode
#
# """
#
# import pytest
# import allure
#
# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge]
#
# setup_params_general = {
# "mode": "BRIDGE",
# "ssid_modes": {
# "wpa2_personal": [
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
# "security_key": "something"}]},
# "rf": {},
# "radius": False
# }
#
#
# @pytest.mark.basic
# @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
# @pytest.mark.parametrize(
# 'setup_profiles',
# [setup_params_general],
# indirect=True,
# scope="class"
# )
# @pytest.mark.usefixtures("setup_profiles")
# class TestWifiCapacityBridgeMode(object):
#
# @pytest.mark.wpa2_personal
# @pytest.mark.twog
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "BRIDGE"
# band = "twog"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security="wpa2", mode="BRIDGE", band="twog",
# instance_name="wct_instance", )
# assert PASS
#
# @pytest.mark.wpa2_personal
# @pytest.mark.fiveg
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "BRIDGE"
# band = "fiveg"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security=security, mode=mode, band=band,
# instance_name="wct_instance", )
# assert PASS

View File

@@ -1,66 +1,66 @@
"""
Performance : Wifi Capacity Test : NAT Mode
"""
import pytest
import allure
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat]
setup_params_general = {
"mode": "NAT",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@pytest.mark.basic
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestWifiCapacityNATMode(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security="wpa2", mode="NAT", band="twog",
instance_name="wct_instance", )
assert PASS
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security=security, mode=mode, band=band,
instance_name="wct_instance", )
assert PASS
# """
# Performance : Wifi Capacity Test : NAT Mode
#
# """
#
# import pytest
# import allure
#
# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat]
#
# setup_params_general = {
# "mode": "NAT",
# "ssid_modes": {
# "wpa2_personal": [
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
# "security_key": "something"}]},
# "rf": {},
# "radius": False
# }
#
#
# @pytest.mark.basic
# @allure.feature("NAT MODE CLIENT CONNECTIVITY")
# @pytest.mark.parametrize(
# 'setup_profiles',
# [setup_params_general],
# indirect=True,
# scope="class"
# )
# @pytest.mark.usefixtures("setup_profiles")
# class TestWifiCapacityNATMode(object):
#
# @pytest.mark.wpa2_personal
# @pytest.mark.twog
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "NAT"
# band = "twog"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security="wpa2", mode="NAT", band="twog",
# instance_name="wct_instance", )
# assert PASS
#
# @pytest.mark.wpa2_personal
# @pytest.mark.fiveg
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "NAT"
# band = "fiveg"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security=security, mode=mode, band=band,
# instance_name="wct_instance", )
# assert PASS

View File

@@ -1,66 +1,66 @@
"""
Performance : Wifi Capacity Test : VLAN Mode
"""
import pytest
import allure
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan]
setup_params_general = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@pytest.mark.basic
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestWifiCapacityVLANMode(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security="wpa2", mode="VLAN", band="twog",
instance_name="wct_instance", )
assert PASS
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
security=security, mode=mode, band=band,
instance_name="wct_instance", )
assert PASS
# """
# Performance : Wifi Capacity Test : VLAN Mode
#
# """
#
# import pytest
# import allure
#
# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan]
#
# setup_params_general = {
# "mode": "VLAN",
# "ssid_modes": {
# "wpa2_personal": [
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
# "security_key": "something"}]},
# "rf": {},
# "radius": False
# }
#
#
# @pytest.mark.basic
# @allure.feature("VLAN MODE CLIENT CONNECTIVITY")
# @pytest.mark.parametrize(
# 'setup_profiles',
# [setup_params_general],
# indirect=True,
# scope="class"
# )
# @pytest.mark.usefixtures("setup_profiles")
# class TestWifiCapacityVLANMode(object):
#
# @pytest.mark.wpa2_personal
# @pytest.mark.twog
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "VLAN"
# band = "twog"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security="wpa2", mode="VLAN", band="twog",
# instance_name="wct_instance", )
# assert PASS
#
# @pytest.mark.wpa2_personal
# @pytest.mark.fiveg
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
# get_configuration):
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"]
# security_key = profile_data["security_key"]
# security = "wpa2"
# mode = "VLAN"
# band = "fiveg"
# vlan = 1
# dut_name = create_lanforge_chamberview_dut
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
# security=security, mode=mode, band=band,
# instance_name="wct_instance", )
# assert PASS

View File

@@ -6,7 +6,8 @@
import allure
import pytest
pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_55]
pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_55,
pytest.mark.usefixtures("setup_test_run")]
@allure.testcase("firmware upgrade from Cloud")
@@ -57,9 +58,19 @@ class TestFirmware(object):
@pytest.mark.firmware_ap
def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, update_report,
def test_ap_firmware(get_configuration, get_apnos, get_latest_firmware, update_report,
test_cases):
if check_ap_firmware_ssh == get_latest_firmware:
"""yields the active version of firmware on ap"""
active_fw_list = []
try:
for access_point in get_configuration['access_point']:
ap_ssh = get_apnos(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = []
if active_fw_list == get_latest_firmware:
update_report.update_testrail(case_id=test_cases["ap_upgrade"],
status_id=1,
msg='Upgrade to ' + str(get_latest_firmware) + ' successful')
@@ -68,4 +79,4 @@ def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, update_report,
status_id=4,
msg='Cannot reach AP after upgrade to check CLI - re-test required')
assert check_ap_firmware_ssh == get_latest_firmware
assert active_fw_list == get_latest_firmware