wifi capacity test

This commit is contained in:
anjali
2021-07-15 12:25:58 +05:30
parent 9c8914fe15
commit ca343d18a2
5 changed files with 390 additions and 1191 deletions

View File

@@ -50,6 +50,7 @@ class RunTest:
self.lf_ssh_port = lanforge_data["ssh_port"] self.lf_ssh_port = lanforge_data["ssh_port"]
self.staConnect = None self.staConnect = None
self.dataplane_obj = None self.dataplane_obj = None
self.wificapacity_obj = None
self.influx_params = influx_params self.influx_params = influx_params
self.influxdb = RecordInflux(_lfjson_host=self.lanforge_ip, self.influxdb = RecordInflux(_lfjson_host=self.lanforge_ip,
_lfjson_port=self.lanforge_port, _lfjson_port=self.lanforge_port,
@@ -200,28 +201,50 @@ class RunTest:
self.eap_connect.cleanup(station_name) self.eap_connect.cleanup(station_name)
return self.eap_connect.passes() return self.eap_connect.passes()
def wifi_capacity(self, ssid="[BLANK]", paswd="[BLANK]", security="open", mode="BRIDGE", band="twog", def wifi_capacity(self, mode="BRIDGE", vlan_id=100, instance_name="wct_instance", stations=None):
instance_name="wct_instance"): if mode == "BRIDGE":
'''SINGLE WIFI CAPACITY using lf_wifi_capacity.py''' self.client_connect.upstream_port = self.upstream_port
self.wfc_test = WiFiCapacityTest(lfclient_host=self.lanforge_ip, lf_port=self.lanforge_port, elif mode == "NAT":
lf_user="lanforge", lf_password="lanforge", instance_name=instance_name, self.client_connect.upstream_port = self.upstream_port
config_name="wifi_config", upstream=self.upstream_port, batch_size="1", elif mode == "VLAN":
loop_iter="1", protocol="UDP-IPv4", duration="3000", pull_report=False, self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
load_old_cfg=False, upload_rate="10Mbps", download_rate="1Gbps", self.wificapacity_obj = WiFiCapacityTest(lfclient_host=self.lanforge_ip,
sort="interleave", stations="1.1.sta0000,1.1.sta0001", create_stations=True, lf_port=self.lanforge_port,
radio=["wiphy0"], security=security, paswd=paswd, ssid=ssid, enables=[], lf_user="lanforge",
disables=[], raw_lines=[], raw_lines_file="", sets=[]) lf_password="lanforge",
report_dir=self.local_report_path,
instance_name=instance_name,
config_name="wifi_config",
upstream="1.1." + self.upstream_port,
batch_size="1",
loop_iter="1",
protocol="UDP-IPv4",
duration="3000",
pull_report=True,
load_old_cfg=False,
upload_rate="10Mbps",
download_rate="1Gbps",
sort="interleave",
stations=stations,
create_stations=False,
radio=None,
security=None,
paswd=None,
ssid=None,
enables=[],
disables=[],
raw_lines=[],
raw_lines_file="",
sets=[])
if band == "twog": self.wificapacity_obj.setup()
self.wfc_test.radio = self.twog_radios[0] self.wificapacity_obj.run()
if band == "fiveg": report_name = self.wificapacity_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
self.wfc_test.radio = self.fiveg_radios[0] influx = CSVtoInflux(influxdb=self.influxdb, _influx_tag=self.influx_params["influx_tag"],
target_csv=self.local_report_path + report_name + "/kpi.csv")
influx.post_to_influx()
self.wfc_test.setup() return self.wificapacity_obj
self.wfc_test.run()
result = True
return result
def Client_Connect(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE", band="twog", def Client_Connect(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE", band="twog",
vlan_id=100, vlan_id=100,

View File

@@ -1,14 +1,14 @@
""" """
Performance Test: Throughput vs Various Pkt Size Test: nat Mode Performance Test: Wifi Capacity Test : Nat Mode
pytest -m "throughput_vs_pkt and nat" pytest -m "wifi_capacity_test and nat"
""" """
import os import os
import pytest import pytest
import allure import allure
pytestmark = [pytest.mark.throughput_vs_pkt, pytest.mark.nat, pytest.mark.wpa2, pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat,
pytest.mark.usefixtures("setup_test_run")] pytest.mark.usefixtures("setup_test_run")]
setup_params_general = { setup_params_general = {
@@ -18,7 +18,6 @@ setup_params_general = {
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]}, "security_key": "something"}]},
"rf": {}, "rf": {},
"radius": False "radius": False
} }
@@ -32,44 +31,36 @@ setup_params_general = {
scope="class" scope="class"
) )
@pytest.mark.usefixtures("setup_profiles") @pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktNatAWpa22G(object): class TestWifiCapacityNatMode(object):
"""Throughput vs Various Pkt Size Test nat mode """ Wifi Capacity Test Nat Mode
pytest -m "throughput_vs_pkt and nat" pytest -m "wifi_capacity_test and nat"
""" """
@pytest.mark.wpa2_personal @pytest.mark.wpa2_personal
@pytest.mark.twog @pytest.mark.twog
@pytest.mark.pkt60 def test_client_wpa2_nat_2g(self, get_vif_state,
def test_client_wpa2_personal_pkt_60_2g(self, get_vif_state, lf_test, station_names_twog, create_lanforge_chamberview_dut,
lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration):
get_configuration): """ Wifi Capacity Test Nat Mode
"""Throughput Vs Pkt Sizes nat Mode pytest -m "wifi_capacity_test and nat and wpa2_personal and twog"
pytest -m "throughput_vs_pkt and nat and wpa2_personal and twog"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2" security = "wpa2"
mode = "NAT" mode = "NAT"
security_key = profile_data["security_key"]
band = "twog" band = "twog"
vlan = 1 vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 60'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
if ssid_name not in get_vif_state: if ssid_name 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 NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key, station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
mode=mode, band=band, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan) station_name=station_names_twog, vlan_id=vlan)
if station: if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_twog[0],
instance_name="TIP_PERF_DPT_WPA2_2G", instance_name="test_wct_wpa2_nat", mode=mode, vlan_id=vlan)
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) report_name = wct_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 + '/') entries = os.listdir("../reports/" + report_name + '/')
pdf = False pdf = False
for i in entries: for i in entries:
@@ -84,248 +75,13 @@ class TestThroughputVsPktNatAWpa22G(object):
else: else:
assert False assert False
@pytest.mark.wpa2_personal setup_params_general_5g = {
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa2_personal_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt 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"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 142'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa2_personal_pkt_256_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt 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"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 256'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa2_personal_pkt_512_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt 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"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 512'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa2_personal_pkt_1024_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt 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"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 1024'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa2_personal_pkt_MTU_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt 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"]
security = "wpa2"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: MTU'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
setup_params_5g = {
"mode": "NAT", "mode": "NAT",
"ssid_modes": { "ssid_modes": {
"wpa2_personal": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, "wpa2_personal": [
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
"security_key": "something"}]}, {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {}, "rf": {},
"radius": False "radius": False
} }
@@ -334,284 +90,41 @@ setup_params_5g = {
@allure.feature("NAT MODE CLIENT CONNECTIVITY") @allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize( @pytest.mark.parametrize(
'setup_profiles', 'setup_profiles',
[setup_params_5g], [setup_params_general_5g],
indirect=True, indirect=True,
scope="class" scope="class"
) )
@pytest.mark.usefixtures("setup_profiles") @pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktNatWpa25G(object): class TestWifiCapacityNatMode5g(object):
"""Throughput vs Various Pkt Size Test nat mode """ Wifi Capacity Test Nat mode
pytest -m "throughput_vs_pkt and nat" pytest -m "wifi_capacity_test and Nat"
""" """
@pytest.mark.wpa2_personal @pytest.mark.wpa2_personal
@pytest.mark.fiveg @pytest.mark.fiveg
@pytest.mark.pkt60 def test_client_wpa2_nat_5gg(self, get_vif_state,
def test_client_wpa2_personal_pkt_60_5g(self, get_vif_state, lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
get_configuration): """ Wifi Capacity Test Nat mode
"""Throughput Vs Pkt Sizes nat Mode pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg"
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
""" """
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1] profile_data = setup_params_general_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2" security = "wpa2"
mode = "NAT" mode = "NAT"
security_key = profile_data["security_key"]
band = "fiveg" band = "fiveg"
vlan = 1 vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 60'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
if ssid_name not in get_vif_state: if ssid_name 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 NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key, station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
mode=mode, band=band, mode=mode, band=band,
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, wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_fiveg[0],
instance_name="TIP_PERF_DPT_WPA2_5G", instance_name="test_wct_wpa2_nat", mode=mode, vlan_id=vlan)
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) report_name = wct_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 + '/')
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_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_wpa2_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
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
raw_lines = [['pkts: 142'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_wpa2_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
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
raw_lines = [['pkts: 256'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_wpa2_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
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
raw_lines = [['pkts: 512'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_wpa2_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
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
raw_lines = [['pkts: 1024'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_wpa2_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes nat Mode
pytest -m "throughput_vs_pkt and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
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
raw_lines = [['pkts: MTU'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
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 pdf = False
for i in entries: for i in entries:

View File

@@ -1,14 +1,14 @@
""" """
Performance Test: Throughput vs Various Pkt Size Test: VLAN MODE Performance Test: Wifi Capacity Test : Vlan Mode
pytest -m "throughput_vs_pkt and vlan" pytest -m "wifi_capacity_test and vlan"
""" """
import os import os
import pytest import pytest
import allure import allure
pytestmark = [pytest.mark.throughput_vs_pkt, pytest.mark.vlan, pytest.mark.wpa2, pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan,
pytest.mark.usefixtures("setup_test_run")] pytest.mark.usefixtures("setup_test_run")]
setup_params_general = { setup_params_general = {
@@ -18,13 +18,12 @@ setup_params_general = {
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]}, "security_key": "something"}]},
"rf": {}, "rf": {},
"radius": False "radius": False
} }
@allure.feature("VLAN MODE CLIENT CONNECTIVITY") @allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize( @pytest.mark.parametrize(
'setup_profiles', 'setup_profiles',
[setup_params_general], [setup_params_general],
@@ -32,91 +31,36 @@ setup_params_general = {
scope="class" scope="class"
) )
@pytest.mark.usefixtures("setup_profiles") @pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktVlanWpa22G(object): class TestWifiCapacityVlanMode(object):
"""Throughput vs Various Pkt Size Test vlan mode """ Wifi Capacity Test Vlan Mode
pytest -m "throughput_vs_pkt and vlan" pytest -m "wifi_capacity_test and vlan"
""" """
@pytest.mark.wpa2_personal @pytest.mark.wpa2_personal
@pytest.mark.twog @pytest.mark.twog
@pytest.mark.pkt60 def test_client_wpa2_vlan_2g(self, get_vif_state,
def test_client_wpa2_personal_vlan_pkt_60_2g(self, get_vif_state, lf_test, station_names_twog, create_lanforge_chamberview_dut,
lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration):
get_configuration): """ Wifi Capacity Test Vlan Mode
"""Throughput Vs Pkt Sizes VLAN MODE pytest -m "wifi_capacity_test and vlan and wpa2_personal and twog"
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and twog"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2" security = "wpa2"
mode = "VLAN" mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 60'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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,
mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa2_personal_vlan_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt 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_key = profile_data["security_key"]
security = "wpa2"
mode = "VLAN"
band = "twog" band = "twog"
vlan = 1 vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 142'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
if ssid_name not in get_vif_state: if ssid_name 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 NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key, station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
mode=mode, band=band, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan) station_name=station_names_twog, vlan_id=vlan)
if station: if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_twog[0],
instance_name="TIP_PERF_DPT_WPA2_2G", instance_name="test_wct_wpa2_vlan", mode=mode, vlan_id=vlan)
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) report_name = wct_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 + '/') entries = os.listdir("../reports/" + report_name + '/')
pdf = False pdf = False
for i in entries: for i in entries:
@@ -131,196 +75,7 @@ class TestThroughputVsPktVlanWpa22G(object):
else: else:
assert False assert False
@pytest.mark.wpa2_personal setup_params_general_5g = {
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa2_personal_vlan_pkt_256_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt 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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 256'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa2_personal_vlan_pkt_512_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt 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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 512'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa2_personal_vlan_pkt_1024_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt 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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 1024'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa2_personal_vlan_pkt_MTU_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt 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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: MTU'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_2G",
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_twog)
assert station
else:
assert False
setup_params_5g = {
"mode": "VLAN", "mode": "VLAN",
"ssid_modes": { "ssid_modes": {
"wpa2_personal": [ "wpa2_personal": [
@@ -335,284 +90,41 @@ setup_params_5g = {
@allure.feature("VLAN MODE CLIENT CONNECTIVITY") @allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize( @pytest.mark.parametrize(
'setup_profiles', 'setup_profiles',
[setup_params_5g], [setup_params_general_5g],
indirect=True, indirect=True,
scope="class" scope="class"
) )
@pytest.mark.usefixtures("setup_profiles") @pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktVlan5G(object): class TestWifiCapacityVlanMode5g(object):
"""Throughput vs Various Pkt Size Test vlan mode """ Wifi Capacity Test Vlan mode
pytest -m "throughput_vs_pkt and vlan" pytest -m "wifi_capacity_test and vlan"
""" """
@pytest.mark.wpa2_personal @pytest.mark.wpa2_personal
@pytest.mark.fiveg @pytest.mark.fiveg
@pytest.mark.pkt60 def test_client_wpa2_vlan_5g(self, get_vif_state,
def test_client_wpa2_personal_vlan_pkt_60_5g(self, get_vif_state, lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
get_configuration): """ Wifi Capacity Test Vlan mode
"""Throughput Vs Pkt Sizes VLAN MODE pytest -m "wifi_capacity_test and vlan and wpa2_personal and fiveg"
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
""" """
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1] profile_data = setup_params_general_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2" security = "wpa2"
mode = "VLAN" mode = "VLAN"
security_key = profile_data["security_key"]
band = "fiveg" band = "fiveg"
vlan = 1 vlan = 1
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 60'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
if ssid_name not in get_vif_state: if ssid_name 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 NOT AVAILABLE IN VIF STATE") pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key, station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
mode=mode, band=band, mode=mode, band=band,
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, wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_fiveg[0],
instance_name="TIP_PERF_DPT_WPA2_5G", instance_name="test_wct_wpa2_vlan", mode=mode, vlan_id=vlan)
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) report_name = wct_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 + '/')
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_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_wpa2_personal_vlan_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 142'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_wpa2_personal_vlan_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 256'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_wpa2_personal_vlan_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 512'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_wpa2_personal_vlan_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: 1024'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_wpa2_personal_vlan_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_5g["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
dut_name = create_lanforge_chamberview_dut
raw_lines = [['pkts: MTU'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
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, raw_lines=raw_lines)
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 pdf = False
for i in entries: for i in entries:

View File

@@ -1,66 +1,140 @@
# """ """
# Performance : Wifi Capacity Test : Bridge Mode
# Performance Test: Wifi Capacity Test : Bridge Mode
# """ pytest -m "wifi_capacity_test and bridge"
#
# import pytest """
# import allure import os
# import pytest
# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge] import allure
#
# setup_params_general = { pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge,
# "mode": "BRIDGE", pytest.mark.usefixtures("setup_test_run")]
# "ssid_modes": {
# "wpa2_personal": [ setup_params_general = {
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, "mode": "BRIDGE",
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], "ssid_modes": {
# "security_key": "something"}]}, "wpa2_personal": [
# "rf": {}, {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
# "radius": False {"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', @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
# [setup_params_general], @pytest.mark.parametrize(
# indirect=True, 'setup_profiles',
# scope="class" [setup_params_general],
# ) indirect=True,
# @pytest.mark.usefixtures("setup_profiles") scope="class"
# class TestWifiCapacityBridgeMode(object): )
# @pytest.mark.usefixtures("setup_profiles")
# @pytest.mark.wpa2_personal class TestWifiCapacityBridgeMode(object):
# @pytest.mark.twog """ Wifi Capacity Test Bridge mode
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, pytest -m "wifi_capacity_test and bridge"
# get_configuration): """
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"] @pytest.mark.wpa2_personal
# security_key = profile_data["security_key"] @pytest.mark.twog
# security = "wpa2" def test_client_wpa2_bridge_2g(self, get_vif_state,
# mode = "BRIDGE" lf_test, station_names_twog, create_lanforge_chamberview_dut,
# band = "twog" get_configuration):
# vlan = 1 """ Wifi Capacity Test Bridge mode
# dut_name = create_lanforge_chamberview_dut pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog"
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"], """
# security="wpa2", mode="BRIDGE", band="twog", profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# instance_name="wct_instance", ) ssid_name = profile_data["ssid_name"]
# assert PASS security = "wpa2"
# mode = "BRIDGE"
# @pytest.mark.wpa2_personal security_key = profile_data["security_key"]
# @pytest.mark.fiveg band = "twog"
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, vlan = 1
# get_configuration): if ssid_name not in get_vif_state:
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
# ssid_name = profile_data["ssid_name"] pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
# security_key = profile_data["security_key"] station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
# security = "wpa2" mode=mode, band=band,
# mode = "BRIDGE" station_name=station_names_twog, vlan_id=vlan)
# band = "fiveg" if station:
# vlan = 1 wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_twog[0],
# dut_name = create_lanforge_chamberview_dut instance_name="test_wct_wpa2_bridge", mode=mode, vlan_id=vlan)
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"], report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
# security=security, mode=mode, band=band, entries = os.listdir("../reports/" + report_name + '/')
# instance_name="wct_instance", ) pdf = False
# assert PASS 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)
assert station
else:
assert False
setup_params_general_5g = {
"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
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestWifiCapacityBridgeMode5g(object):
""" Wifi Capacity Test Bridge mode
pytest -m "wifi_capacity_test and bridge"
"""
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_bridge_5gg(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
""" Wifi Capacity Test Bridge mode
pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
security_key = profile_data["security_key"]
band = "fiveg"
vlan = 1
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:
wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_fiveg[0],
instance_name="test_wct_wpa2_bridge", mode=mode, vlan_id=vlan)
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
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,143 @@
# """ """
# Performance : Wifi Capacity Test : NAT Mode
# Performance Test: Wifi Capacity Test : Nat Mode
# """ pytest -m "wifi_capacity_test and nat"
#
# import pytest """
# import allure import os
# import pytest
# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat] import allure
#
# setup_params_general = { pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat,
# "mode": "NAT", pytest.mark.usefixtures("setup_test_run")]
# "ssid_modes": {
# "wpa2_personal": [ setup_params_general = {
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"}, "mode": "NAT",
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], "ssid_modes": {
# "security_key": "something"}]}, "wpa2_personal": [
# "rf": {}, {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
# "radius": False {"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', @allure.feature("NAT MODE CLIENT CONNECTIVITY")
# [setup_params_general], @pytest.mark.parametrize(
# indirect=True, 'setup_profiles',
# scope="class" [setup_params_general],
# ) indirect=True,
# @pytest.mark.usefixtures("setup_profiles") scope="class"
# class TestWifiCapacityNATMode(object): )
# @pytest.mark.usefixtures("setup_profiles")
# @pytest.mark.wpa2_personal class TestWifiCapacityNatMode(object):
# @pytest.mark.twog """ Wifi Capacity Test Nat mode
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, pytest -m "wifi_capacity_test and nat"
# get_configuration): """
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# ssid_name = profile_data["ssid_name"] @pytest.mark.wpa2_personal
# security_key = profile_data["security_key"] @pytest.mark.twog
# security = "wpa2" def test_client_open_pkt_60_2g(self, get_vif_state,
# mode = "NAT" lf_test, station_names_twog, create_lanforge_chamberview_dut,
# band = "twog" get_configuration):
# vlan = 1 """ Wifi Capacity Test Nat mode
# dut_name = create_lanforge_chamberview_dut pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog"
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"], """
# security="wpa2", mode="NAT", band="twog", profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
# instance_name="wct_instance", ) ssid_name = profile_data["ssid_name"]
# assert PASS security = "wpa2"
# mode = "BRIDGE"
# @pytest.mark.wpa2_personal security_key = profile_data["security_key"]
# @pytest.mark.fiveg band = "twog"
# def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, vlan = 1
# get_configuration): if ssid_name not in get_vif_state:
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
# ssid_name = profile_data["ssid_name"] pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
# security_key = profile_data["security_key"] station = lf_test.Client_Connect(ssid=ssid_name, security=security, passkey=security_key,
# security = "wpa2" mode=mode, band=band,
# mode = "NAT" station_name=station_names_twog, vlan_id=vlan)
# band = "fiveg" if station:
# vlan = 1 wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_twog[0],
# dut_name = create_lanforge_chamberview_dut instance_name="test_wct_wpa2_bridge", mode=mode, vlan_id=vlan)
# PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"], report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
# security=security, mode=mode, band=band, entries = os.listdir("../reports/" + report_name + '/')
# instance_name="wct_instance", ) pdf = False
# assert PASS 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)
assert station
else:
assert False
setup_params_general_5g = {
"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
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestWifiCapacityNatMode5g(object):
""" Wifi Capacity Test Nat mode
pytest -m "wifi_capacity_test and bridge"
"""
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_open_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
""" Wifi Capacity Test Nat mode
pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2"
mode = "BRIDGE"
security_key = profile_data["security_key"]
band = "fiveg"
vlan = 1
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:
wct_obj = lf_test.wifi_capacity(stations="1.1.%s" % station_names_fiveg[0],
instance_name="test_wct_wpa2_bridge", mode=mode, vlan_id=vlan)
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
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")
print("Test Completed... Cleaning up Stations")
lf_test.Client_disconnect(station_name=station_names_fiveg)
assert station
else:
assert False