mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +00:00
wifi capacity test adjustments
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -81,18 +81,38 @@ class APNOS:
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
# Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
|
# Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
|
||||||
def iwinfo_status(self):
|
def get_bssid_band_mapping(self):
|
||||||
client = self.ssh_cli_connect()
|
client = self.ssh_cli_connect()
|
||||||
cmd = 'iwinfo'
|
cmd = 'iwinfo'
|
||||||
if self.mode:
|
if self.mode:
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
f"cmd --value \"{cmd}\" "
|
f"cmd --value \"{cmd}\" "
|
||||||
stdin, stdout, stderr = client.exec_command(cmd)
|
stdin, stdout, stderr = client.exec_command(cmd)
|
||||||
output = stdout.read()
|
data = stdout.read()
|
||||||
client.close()
|
client.close()
|
||||||
allure.attach(name="iwinfo Output Msg: ", body=str(output))
|
allure.attach(name="iwinfo Output Msg: ", body=str(data))
|
||||||
allure.attach(name="iwinfo config Err Msg: ", body=str(stderr))
|
allure.attach(name="iwinfo config Err Msg: ", body=str(stderr))
|
||||||
return output
|
data = str(data).replace(" ", "").split("\\r\\n")
|
||||||
|
band_info = []
|
||||||
|
for i in data:
|
||||||
|
tmp = []
|
||||||
|
if i.__contains__("AccessPoint"):
|
||||||
|
bssid = i.replace("AccessPoint:", "")
|
||||||
|
tmp.append(bssid.casefold())
|
||||||
|
elif i.__contains__("MasterChannel"):
|
||||||
|
if i.split(":")[2].__contains__("2.4"):
|
||||||
|
tmp.append("2G")
|
||||||
|
else:
|
||||||
|
tmp.append("5G")
|
||||||
|
else:
|
||||||
|
tmp = []
|
||||||
|
if tmp != []:
|
||||||
|
band_info.append(tmp)
|
||||||
|
bssi_band_mapping = {}
|
||||||
|
for i in range(len(band_info)):
|
||||||
|
if (i % 2) == 0:
|
||||||
|
bssi_band_mapping[band_info[i][0]] = band_info[i+1][0]
|
||||||
|
return bssi_band_mapping
|
||||||
|
|
||||||
# Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
|
# Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
|
||||||
def get_vif_config(self):
|
def get_vif_config(self):
|
||||||
@@ -362,15 +382,20 @@ class APNOS:
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
obj = {
|
obj = {
|
||||||
'jumphost': True,
|
'jumphost': True,
|
||||||
'ip': "localhost",
|
'ip': "10.28.3.100",
|
||||||
'username': "lanforge",
|
'username': "lanforge",
|
||||||
'password': "pumpkin77",
|
'password': "pumpkin77",
|
||||||
'port': 8803,
|
'port': 22,
|
||||||
'jumphost_tty': '/dev/ttyAP2'
|
'jumphost_tty': '/dev/ttyAP1'
|
||||||
}
|
}
|
||||||
var = APNOS(credentials=obj)
|
var = APNOS(credentials=obj)
|
||||||
r = var.get_ssid_info()
|
abc = var.get_bssid_band_mapping()
|
||||||
print(r)
|
|
||||||
print(var.get_ssid_info())
|
|
||||||
print(var.get_manager_state())
|
# lst.remove("")
|
||||||
print(var.get_vlan())
|
print(abc)
|
||||||
|
# r = var.get_ssid_info()
|
||||||
|
# print(r)
|
||||||
|
# print(var.get_ssid_info())
|
||||||
|
# print(var.get_manager_state())
|
||||||
|
# print(var.get_vlan())
|
||||||
@@ -283,7 +283,7 @@ class RunTest:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def dataplane(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
def dataplane(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
||||||
upload_rate="85%", duration="1m", instance_name="test_demo", raw_lines=None):
|
upload_rate="0", duration="15s", instance_name="test_demo", raw_lines=None):
|
||||||
if mode == "BRIDGE":
|
if mode == "BRIDGE":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.client_connect.upstream_port = self.upstream_port
|
||||||
elif mode == "NAT":
|
elif mode == "NAT":
|
||||||
@@ -292,13 +292,14 @@ class RunTest:
|
|||||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
|
|
||||||
if raw_lines is None:
|
if raw_lines is None:
|
||||||
raw_lines = [['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types: UDP;TCP'],
|
raw_lines = [['pkts: 60, 142, 256, 512, 1024, MTU, 4000'], ['directions: DUT Transmit;DUT Receive'],
|
||||||
|
['traffic_types: UDP;TCP'],
|
||||||
["show_3s: 1"], ["show_ll_graphs: 1"], ["show_log: 1"]]
|
["show_3s: 1"], ["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||||
|
|
||||||
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
|
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
|
||||||
lf_port=self.lanforge_port,
|
lf_port=self.lanforge_port,
|
||||||
ssh_port=self.lf_ssh_port,
|
ssh_port=self.lf_ssh_port,
|
||||||
local_path=self.local_report_path,
|
local_lf_report_dir=self.local_report_path,
|
||||||
lf_user="lanforge",
|
lf_user="lanforge",
|
||||||
lf_password="lanforge",
|
lf_password="lanforge",
|
||||||
instance_name=instance_name,
|
instance_name=instance_name,
|
||||||
@@ -323,13 +324,13 @@ class RunTest:
|
|||||||
return self.dataplane_obj
|
return self.dataplane_obj
|
||||||
|
|
||||||
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
||||||
instance_name="test_demo"):
|
instance_name="test_demo", dut_5g="", dut_2g=""):
|
||||||
if mode == "BRIDGE":
|
if mode == "BRIDGE":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.upstream_port = self.upstream_port
|
||||||
elif mode == "NAT":
|
elif mode == "NAT":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.upstream_port = self.upstream_port
|
||||||
else:
|
else:
|
||||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
self.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
|
|
||||||
self.dualbandptest_obj = ApAutoTest(lf_host=self.lanforge_ip,
|
self.dualbandptest_obj = ApAutoTest(lf_host=self.lanforge_ip,
|
||||||
lf_port=self.lanforge_port,
|
lf_port=self.lanforge_port,
|
||||||
@@ -339,27 +340,30 @@ class RunTest:
|
|||||||
config_name="dbp_config",
|
config_name="dbp_config",
|
||||||
upstream="1.1." + self.upstream_port,
|
upstream="1.1." + self.upstream_port,
|
||||||
pull_report=True,
|
pull_report=True,
|
||||||
dut5_0=dut_name + ' ' + ssid_5G,
|
dut5_0=dut_5g,
|
||||||
dut2_0=dut_name + ' ' + ssid_2G,
|
dut2_0=dut_2g,
|
||||||
load_old_cfg=False,
|
load_old_cfg=False,
|
||||||
max_stations_2=1,
|
local_lf_report_dir=self.local_report_path,
|
||||||
max_stations_5=1,
|
max_stations_2=64,
|
||||||
max_stations_dual=2,
|
max_stations_5=64,
|
||||||
radio2=[["1.1.wiphy0"]],
|
max_stations_dual=124,
|
||||||
radio5=[["1.1.wiphy1"]],
|
radio2=[self.twog_radios],
|
||||||
|
radio5=[self.fiveg_radios],
|
||||||
sets=[['Basic Client Connectivity', '0'], ['Multi Band Performance', '1'],
|
sets=[['Basic Client Connectivity', '0'], ['Multi Band Performance', '1'],
|
||||||
['Throughput vs Pkt Size', '0'], ['Capacity', '0'],
|
['Throughput vs Pkt Size', '0'], ['Capacity', '0'],
|
||||||
|
['Skip 2.4Ghz Tests', '1'],
|
||||||
|
['Skip 5Ghz Tests', '1'],
|
||||||
['Stability', '0'],
|
['Stability', '0'],
|
||||||
['Band-Steering', '0'], ['Multi-Station Throughput vs Pkt Size', '0'],
|
['Band-Steering', '0'], ['Multi-Station Throughput vs Pkt Size', '0'],
|
||||||
['Long-Term', '0']]
|
['Long-Term', '0']]
|
||||||
)
|
)
|
||||||
self.dualbandptest_obj.setup()
|
self.dualbandptest_obj.setup()
|
||||||
self.dualbandptest_obj.run()
|
self.dualbandptest_obj.run()
|
||||||
report_name = self.dataplane_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
influx = CSVtoInflux(influxdb=self.influxdb,
|
# influx = CSVtoInflux(influxdb=self.influxdb,
|
||||||
_influx_tag=self.influx_params["influx_tag"],
|
# _influx_tag=self.influx_params["influx_tag"],
|
||||||
target_csv=self.local_report_path + report_name + "/kpi.csv")
|
# target_csv=self.local_report_path + report_name + "/kpi.csv")
|
||||||
influx.post_to_influx()
|
# influx.post_to_influx()
|
||||||
return self.dualbandptest_obj
|
return self.dualbandptest_obj
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
import allure
|
||||||
from create_chamberview import CreateChamberview
|
from create_chamberview import CreateChamberview
|
||||||
from create_chamberview_dut import DUT
|
from create_chamberview_dut import DUT
|
||||||
import time
|
import time
|
||||||
@@ -29,7 +32,7 @@ class ChamberView:
|
|||||||
self.scenario_name = "TIP-" + self.testbed
|
self.scenario_name = "TIP-" + self.testbed
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
self.exit_on_error = False
|
self.exit_on_error = False
|
||||||
|
self.dut_idx_mapping = {}
|
||||||
self.raw_line = [
|
self.raw_line = [
|
||||||
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
||||||
[2] + ",AUTO -1 NA"],
|
[2] + ",AUTO -1 NA"],
|
||||||
@@ -80,19 +83,34 @@ class ChamberView:
|
|||||||
self.CreateChamberview.sync_cv()
|
self.CreateChamberview.sync_cv()
|
||||||
return self.CreateChamberview, self.scenario_name
|
return self.CreateChamberview, self.scenario_name
|
||||||
|
|
||||||
def add_stations(self, band="twog", num_stations=50, dut="NA"):
|
def add_stations(self, band="2G", num_stations=50, dut="NA", ssid_name=[]):
|
||||||
if band == "twog":
|
idx = 0
|
||||||
|
print(self.dut_idx_mapping)
|
||||||
|
for i in self.dut_idx_mapping:
|
||||||
|
if self.dut_idx_mapping[i][0] == ssid_name and self.dut_idx_mapping[i][3] == band:
|
||||||
|
idx = i
|
||||||
|
max_stations = 0
|
||||||
|
print(idx)
|
||||||
|
if band == "2G":
|
||||||
|
max_stations = 64 * len(self.twog_radios)
|
||||||
radio = ",".join(self.twog_radios)
|
radio = ",".join(self.twog_radios)
|
||||||
if len(self.twog_radios) == 1:
|
if len(self.twog_radios) == 1:
|
||||||
radio = radio + ",AUTO"
|
radio = radio + ",AUTO"
|
||||||
# self.eap_connect.sta_prefix = self.twog_prefix
|
# self.eap_connect.sta_prefix = self.twog_prefix
|
||||||
if band == "fiveg":
|
if band == "5G":
|
||||||
|
max_stations = 64 * len(self.twog_radios)
|
||||||
radio = ",".join(self.fiveg_radios)
|
radio = ",".join(self.fiveg_radios)
|
||||||
if len(self.fiveg_radios) == 1:
|
if len(self.fiveg_radios) == 1:
|
||||||
radio = radio + ",AUTO"
|
radio = radio + ",AUTO"
|
||||||
# self.eap_connect.sta_prefix = self.fiveg_prefix
|
if band == "ax":
|
||||||
|
max_stations = len(self.twog_radios)
|
||||||
station_data = ["profile_link 1.1 STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-1'" + " NA " + radio]
|
radio = ",".join(self.fiveg_radios)
|
||||||
|
if len(self.fiveg_radios) == 1:
|
||||||
|
radio = radio + ",AUTO"
|
||||||
|
# self.eap_connect.sta_prefix = self.fiveg_prefix
|
||||||
|
if num_stations != "max":
|
||||||
|
max_stations = num_stations
|
||||||
|
station_data = ["profile_link 1.1 STA-AUTO " + str(max_stations) + " 'DUT: " + dut + " Radio-" + str(int(idx)+1) + "'" + " NA " + radio]
|
||||||
self.raw_line.append(station_data)
|
self.raw_line.append(station_data)
|
||||||
|
|
||||||
|
|
||||||
@@ -147,3 +165,31 @@ class ChamberView:
|
|||||||
return "empty"
|
return "empty"
|
||||||
else:
|
else:
|
||||||
return df
|
return df
|
||||||
|
|
||||||
|
def attach_report_graphs(self, report_name=None, pdf_name="WIFI Capacity Test PDF Report"):
|
||||||
|
relevant_path = "../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=relevant_path + pdf,
|
||||||
|
name=pdf_name)
|
||||||
|
|
||||||
|
included_extensions = ['png']
|
||||||
|
file_names = [fn for fn in os.listdir(relevant_path)
|
||||||
|
if any(fn.endswith(ext) for ext in included_extensions)]
|
||||||
|
|
||||||
|
a = [item for item in file_names if 'kpi' not in item]
|
||||||
|
a = [item for item in a if 'print' not in item]
|
||||||
|
a = [item for item in a if 'logo' not in item]
|
||||||
|
a = [item for item in a if 'Logo' not in item]
|
||||||
|
a = [item for item in a if 'candela' not in item]
|
||||||
|
|
||||||
|
a.sort()
|
||||||
|
for i in a:
|
||||||
|
allure.attach.file(source=relevant_path + i,
|
||||||
|
name=i,
|
||||||
|
attachment_type="image/png", extension=None)
|
||||||
|
|
||||||
|
|||||||
@@ -200,33 +200,27 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
if mode == "wpa2_personal":
|
if mode == "wpa2_personal":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
|
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa2_personal_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa2_personal_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa2_personal_2g"] = False
|
test_cases["wpa2_personal_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
try:
|
|
||||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
|
||||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
|
||||||
test_cases["wpa2_personal_5g"] = True
|
|
||||||
allure.attach(body=str(creates_profile),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa2_personal_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
|
|
||||||
if mode == "wpa_wpa2_personal_mixed":
|
if mode == "wpa_wpa2_personal_mixed":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
@@ -531,11 +525,14 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
print("failed to create AP Profile")
|
print("failed to create AP Profile")
|
||||||
|
|
||||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
|
# ssid_names = []
|
||||||
|
# for i in instantiate_profile.profile_creation_ids["ssid"]:
|
||||||
|
# ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
||||||
|
# ssid_names.sort()
|
||||||
ssid_names = []
|
ssid_names = []
|
||||||
for i in instantiate_profile.profile_creation_ids["ssid"]:
|
for i in lf_dut_data:
|
||||||
ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
ssid_names.append(i["ssid_name"])
|
||||||
ssid_names.sort()
|
ssid_names.sort()
|
||||||
|
|
||||||
# This loop will check the VIF Config with cloud profile
|
# This loop will check the VIF Config with cloud profile
|
||||||
vif_config = []
|
vif_config = []
|
||||||
test_cases['vifc'] = False
|
test_cases['vifc'] = False
|
||||||
@@ -573,30 +570,46 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
ssid_info = ap_ssh.get_ssid_info()
|
ssid_info = ap_ssh.get_ssid_info()
|
||||||
ssid_data = []
|
ssid_data = []
|
||||||
print(ssid_info)
|
print(ssid_info)
|
||||||
|
band_mapping = ap_ssh.get_bssid_band_mapping()
|
||||||
|
print(band_mapping)
|
||||||
|
idx_mapping = {}
|
||||||
for i in range(0, len(ssid_info)):
|
for i in range(0, len(ssid_info)):
|
||||||
if ssid_info[i][1] == "OPEN":
|
if ssid_info[i][1] == "OPEN":
|
||||||
ssid_info[i].append("")
|
ssid_info[i].append("")
|
||||||
if ssid_info[i][1] == "OPEN":
|
if ssid_info[i][1] == "OPEN":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], ssid_info[i][0]]
|
||||||
|
|
||||||
if ssid_info[i][1] == "WPA":
|
if ssid_info[i][1] == "WPA":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
if ssid_info[i][1] == "WPA2":
|
if ssid_info[i][1] == "WPA2":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
if ssid_info[i][1] == "WPA3_PERSONAL":
|
if ssid_info[i][1] == "WPA3_PERSONAL":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
|
||||||
if ssid_info[i][1] == "WPA | WPA2":
|
if ssid_info[i][1] == "WPA | WPA2":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
|
||||||
if ssid_info[i][1] == "EAP-TTLS":
|
if ssid_info[i][1] == "EAP-TTLS":
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" +
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" +
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
ssid_data.append(ssid)
|
ssid_data.append(ssid)
|
||||||
|
lf_tools.dut_idx_mapping = idx_mapping
|
||||||
# Add bssid password and security from iwinfo data
|
# Add bssid password and security from iwinfo data
|
||||||
# Format SSID Data in the below format
|
# Format SSID Data in the below format
|
||||||
# ssid_data = [
|
# ssid_data = [
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import os
|
|||||||
import pytest
|
import pytest
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.nat, pytest.mark.usefixtures("setup_test_run")]
|
pytestmark = [pytest.mark.performance, pytest.mark.performance_release, pytest.mark.dataplane_throughput_test,
|
||||||
|
pytest.mark.nat, pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
setup_params_general = {
|
setup_params_general = {
|
||||||
"mode": "NAT",
|
"mode": "NAT",
|
||||||
@@ -34,11 +35,12 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat"
|
pytest -m "dataplane_throughput_test and nat"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
def test_client_wpa2_personal_2g(self, get_vif_state,
|
def test_tcp_upd_2g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
get_configuration):
|
get_configuration):
|
||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog"
|
pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog"
|
||||||
"""
|
"""
|
||||||
@@ -62,15 +64,7 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
instance_name="TIP_DPT_DPT_WPA2_2G_NAT",
|
instance_name="TIP_DPT_DPT_WPA2_2G_NAT",
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/" + report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G")
|
||||||
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")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
|
||||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
@@ -78,8 +72,8 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
def test_client_wpa2_personal_5g(self, get_vif_state,
|
def test_tcp_upd_5g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg"
|
pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg"
|
||||||
"""
|
"""
|
||||||
@@ -99,19 +93,13 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
station_name=station_names_fiveg, vlan_id=vlan)
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
|
||||||
if station:
|
if station:
|
||||||
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_DPT_DPT_WPA2_5G_NAT",
|
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
instance_name="TIP_DPT_DPT_WPA2_5G_NAT",
|
||||||
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/"+report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G")
|
||||||
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")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
print("Test Completed... Cleaning up Stations")
|
||||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
|
|||||||
@@ -9,16 +9,15 @@ import os
|
|||||||
import allure
|
import allure
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
pytestmark = [pytest.mark.performance,pytest.mark.dual_band_test, pytest.mark.nat,
|
pytestmark = [pytest.mark.performance, pytest.mark.dual_band_test, pytest.mark.nat, pytest.mark.performance_release]#,
|
||||||
pytest.mark.usefixtures("setup_test_run")]
|
# pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
setup_params_general = {
|
setup_params_general = {
|
||||||
"mode": "NAT",
|
"mode": "NAT",
|
||||||
"ssid_modes": {
|
"ssid_modes": {
|
||||||
"wpa2_personal": [
|
"wpa2_personal": [
|
||||||
{"ssid_name": "ssid_wpa2p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
{"ssid_name": "ssid_wpa2p_2g", "appliedRadios": ["2G", "5G"], "security_key": "something"}
|
||||||
{"ssid_name": "ssid_wpa2p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
]},
|
||||||
"security_key": "something"}]},
|
|
||||||
"rf": {},
|
"rf": {},
|
||||||
"radius": False
|
"radius": False
|
||||||
}
|
}
|
||||||
@@ -33,37 +32,40 @@ setup_params_general = {
|
|||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
class TestDualbandPerformanceNat(object):
|
class TestDualbandPerformanceNat(object):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pytest -m "performance and dual_band_test and nat and wpa2_personal and twog and fiveg"
|
pytest -m "performance and dual_band_test and nat and wpa2_personal and twog and fiveg"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
def test_client_wpa2_personal(self,get_vif_state,create_lanforge_chamberview_dut,lf_test,get_configuration):
|
def test_client_wpa2_personal(self, get_vif_state, lf_tools,
|
||||||
|
create_lanforge_chamberview_dut, lf_test, get_configuration):
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"]
|
||||||
ssid_2G = profile_data[0]["ssid_name"]
|
ssid_2G = profile_data[0]["ssid_name"]
|
||||||
ssid_5G = profile_data[1]["ssid_name"]
|
ssid_5G = profile_data[0]["ssid_name"]
|
||||||
dut_name = create_lanforge_chamberview_dut
|
dut_name = create_lanforge_chamberview_dut
|
||||||
mode = "NAT"
|
mode = "NAT"
|
||||||
vlan = 1
|
vlan = 1
|
||||||
|
print(lf_tools.dut_idx_mapping)
|
||||||
|
dut_5g = ""
|
||||||
|
dut_2g = ""
|
||||||
|
for i in lf_tools.dut_idx_mapping:
|
||||||
|
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||||
|
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4]
|
||||||
|
print(dut_5g)
|
||||||
|
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||||
|
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4]
|
||||||
|
print(dut_2g)
|
||||||
if ssid_2G and ssid_5G not in get_vif_state:
|
if ssid_2G and ssid_5G not in get_vif_state:
|
||||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||||
pytest.xfail("SSID's NOT AVAILABLE IN VIF STATE")
|
pytest.xfail("SSID's NOT AVAILABLE IN VIF STATE")
|
||||||
|
|
||||||
dbpt_obj = lf_test.dualbandperformancetest(mode=mode, ssid_2G=ssid_2G, ssid_5G=ssid_5G,
|
dbpt_obj = lf_test.dualbandperformancetest(mode=mode, ssid_2G=ssid_2G, ssid_5G=ssid_5G,
|
||||||
instance_name="dbp_instance_wpa2p_nat",
|
instance_name="dbp_instance_wpa2p_nat_p",
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
vlan_id=vlan, dut_5g=dut_5g, dut_2g=dut_2g)
|
||||||
report_name = dbpt_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dbpt_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/" + report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dual Band Performance Test")
|
||||||
pdf = False
|
assert True
|
||||||
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"] + "_dualbandperfomance")
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user