throughput across bw

This commit is contained in:
anjali
2021-06-23 15:22:06 +05:30
parent f5f734fdfb
commit 78a9312636
23 changed files with 8288 additions and 5 deletions

View File

@@ -258,7 +258,7 @@ class RunTest:
return True
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"):
upload_rate="85%", duration="1m", instance_name="test_demo", pkt_size=None, bw=None):
if mode == "BRIDGE":
self.client_connect.upstream_port = self.upstream_port
elif mode == "NAT":
@@ -266,6 +266,22 @@ class RunTest:
else:
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
if pkt_size is None:
pkt_size = "Custom;60;142;256;512;1024;MTU"
if bw is not None:
raw_lines = [['pkts: %s' % pkt_size],
['directions: DUT Transmit;DUT Receive'],
['bandw_options: %s' % bw ]
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
raw_lines = [['pkts: %s' % pkt_size],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]]
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
lf_port=self.lanforge_port,
ssh_port=self.lf_ssh_port,
@@ -282,10 +298,7 @@ class RunTest:
duration=duration,
dut=dut_name,
station="1.1." + station_name[0],
raw_lines=[['pkts: Custom;60;142;256;512;1024;MTU'],
['directions: DUT Transmit;DUT Receive'],
['traffic_types: UDP;TCP'], ["show_3s: 1"],
["show_ll_graphs: 1"], ["show_log: 1"]],
raw_lines=raw_lines,
)
self.dataplane_obj.setup()
self.dataplane_obj.run()

View File

@@ -0,0 +1,466 @@
"""
Performance Test: Throughput Across Bandwidth Test: Bridge Mode
pytest -m "throughput_across_bw_test and Bridge"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_across_bw_test, pytest.mark.Bridge,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general_20Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is20MHz"},
"is5GHzL": {"channelBandwidth": "is20MHz"},
"is5GHzU": {"channelBandwidth": "is20MHz"}},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_20Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw20MhzBRIDGE(object):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge"
"""
@pytest.mark.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general_20Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="20")
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.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_40Mhz["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
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, bw="20")
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
setup_params_general_40Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is40MHz"},
"is5GHzL": {"channelBandwidth": "is40MHz"},
"is5GHzU": {"channelBandwidth": "is40MHz"}},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_40Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw40MhzBRIDGE(object):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge"
"""
@pytest.mark.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="40")
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.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
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, bw="40")
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
setup_params_general_80Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is80MHz"},
"is5GHzL": {"channelBandwidth": "is80MHz"},
"is5GHzU": {"channelBandwidth": "is80MHz"}},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_80Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw80MhzBRIDGE(object):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge"
"""
@pytest.mark.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="80")
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.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
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, bw="80")
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
setup_params_general_160Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is160MHz"},
"is5GHzL": {"channelBandwidth": "is160MHz"},
"is5GHzU": {"channelBandwidth": "is160MHz"}},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_160Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw160MhzBRIDGE(object):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge"
"""
@pytest.mark.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_general_160Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="160")
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.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw Bridge Mode
pytest -m "throughput_across_bw_test and Bridge and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_160Mhz["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "wpa2"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
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, bw="160")
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

View File

@@ -0,0 +1,466 @@
"""
Performance Test: Throughput Across Bandwidth Test: nat Mode
pytest -m "throughput_across_bw_test and nat"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_across_bw_test, pytest.mark.nat,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general_20Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is20MHz"},
"is5GHzL": {"channelBandwidth": "is20MHz"},
"is5GHzU": {"channelBandwidth": "is20MHz"}},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_20Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw20MhzNAT(object):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat"
"""
@pytest.mark.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and twog"
"""
profile_data = setup_params_general_20Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="20")
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.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_40Mhz["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
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, bw="20")
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
setup_params_general_40Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is40MHz"},
"is5GHzL": {"channelBandwidth": "is40MHz"},
"is5GHzU": {"channelBandwidth": "is40MHz"}},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_40Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw40MhzNAT(object):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat"
"""
@pytest.mark.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="40")
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.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["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
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, bw="40")
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
setup_params_general_80Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is80MHz"},
"is5GHzL": {"channelBandwidth": "is80MHz"},
"is5GHzU": {"channelBandwidth": "is80MHz"}},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_80Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw80MhzNAT(object):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat"
"""
@pytest.mark.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="80")
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.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["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
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, bw="80")
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
setup_params_general_160Mhz = {
"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": {
"is5GHz": {"channelBandwidth": "is160MHz"},
"is5GHzL": {"channelBandwidth": "is160MHz"},
"is5GHzU": {"channelBandwidth": "is160MHz"}},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_160Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw160MhzNAT(object):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat"
"""
@pytest.mark.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and twog"
"""
profile_data = setup_params_general_160Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="160")
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.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw nat Mode
pytest -m "throughput_across_bw_test and nat and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_160Mhz["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
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, bw="160")
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

View File

@@ -0,0 +1,466 @@
"""
Performance Test: Throughput Across Bandwidth Test: vlan Mode
pytest -m "throughput_across_bw_test and vlan"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_across_bw_test, pytest.mark.vlan,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general_20Mhz = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {
"is5GHz": {"channelBandwidth": "is20MHz"},
"is5GHzL": {"channelBandwidth": "is20MHz"},
"is5GHzU": {"channelBandwidth": "is20MHz"}},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_20Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw20MhzVLAN(object):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan"
"""
@pytest.mark.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and twog"
"""
profile_data = setup_params_general_20Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="20")
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.bw20Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_40Mhz["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
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, bw="20")
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
setup_params_general_40Mhz = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {
"is5GHz": {"channelBandwidth": "is40MHz"},
"is5GHzL": {"channelBandwidth": "is40MHz"},
"is5GHzU": {"channelBandwidth": "is40MHz"}},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_40Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw40MhzVLAN(object):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan"
"""
@pytest.mark.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="40")
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.bw40Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["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
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, bw="40")
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
setup_params_general_80Mhz = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {
"is5GHz": {"channelBandwidth": "is80MHz"},
"is5GHzL": {"channelBandwidth": "is80MHz"},
"is5GHzU": {"channelBandwidth": "is80MHz"}},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_80Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw80MhzVLAN(object):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan"
"""
@pytest.mark.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and twog"
"""
profile_data = setup_params_general_80Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="80")
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.bw80Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_80Mhz["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
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, bw="80")
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
setup_params_general_160Mhz = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {
"is5GHz": {"channelBandwidth": "is160MHz"},
"is5GHzL": {"channelBandwidth": "is160MHz"},
"is5GHzU": {"channelBandwidth": "is160MHz"}},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general_160Mhz],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputAcrossBw160MhzVLAN(object):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan"
"""
@pytest.mark.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.twog
def test_client_wpa2_personal_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and twog"
"""
profile_data = setup_params_general_160Mhz["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"]
security_key = profile_data["security_key"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan)
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, bw="160")
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.bw160Mhz
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
def test_client_wpa2_personal_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
"""Throughput Across Bw vlan Mode
pytest -m "throughput_across_bw_test and vlan and wpa2_personal and fiveg"
"""
profile_data = setup_params_general_160Mhz["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
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, bw="160")
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

View File

@@ -0,0 +1,529 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: Bridge Mode
pytest -m "throughput_vs_pkt and Bridge"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.Bridge, pytest.mark.open,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktBridge2G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.open
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_open_pkt_60_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_60_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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.open
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_open_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_142_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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.open
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_open_pkt_256_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PER_PKT_256_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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.open
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_open_pkt_512_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_512_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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.open
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_open_pkt_1024_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_1024_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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.open
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_open_pkt_MTU_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_MTU_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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": "BRIDGE",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktBridge5G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.open
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_open_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_142_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_open_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_256_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_open_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_512_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_open_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_1024_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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.open
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_open_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "BRIDGE"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_PKT_MTU_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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

View File

@@ -0,0 +1,570 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: nat Mode
pytest -m "throughput_vs_pkt and nat"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.nat, pytest.mark.open,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "NAT",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktNatOpen2G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.open
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_open_pkt_60_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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.open
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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.open
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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.open
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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.open
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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.open
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_2G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
class TestThroughputVsPktNatOpen5G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.open
@pytest.mark.fiveg
@pytest.mark.pkt60
def test_client_open_pkt_60_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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.open
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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_OPEN_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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

View File

@@ -0,0 +1,575 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: VLAN MODE
pytest -m "throughput_vs_pkt and vlan"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.vlan, pytest.mark.open,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "VLAN",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.open
class TestThroughputVsPktVlanOpen2G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.open
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_open_pkt_60_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.open
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.open
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.open
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.open
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.open
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_open_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 open and twog"
"""
profile_data = setup_params_general["ssid_modes"]["open"][0]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.open
class TestThroughputVsPktVlanOpen5G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.open
@pytest.mark.fiveg
@pytest.mark.pkt60
def test_client_open_pkt_60_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.open
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.open
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_open_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 open and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"]
security = "open"
mode = "VLAN"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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

View File

@@ -0,0 +1,576 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: Bridge Mode
pytest -m "throughput_vs_pkt and Bridge"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.Bridge, pytest.mark.wpa2,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("Bridge MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktBridge2G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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 Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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 Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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 Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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 Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and twog"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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": "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_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktBridge5G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa2_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa2_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa2_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa2_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa2_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False

View File

@@ -0,0 +1,578 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: nat Mode
pytest -m "throughput_vs_pkt and nat"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.nat, pytest.mark.wpa2,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "NAT",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktNatAWpa22G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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_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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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 = "wpa2_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"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_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktNatOpen5G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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 = "wpa2_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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

View File

@@ -0,0 +1,578 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: VLAN MODE
pytest -m "throughput_vs_pkt and vlan"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.vlan, pytest.mark.wpa2,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "VLAN",
"ssid_modes": {
"wpa2_personal": [
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktVlanWpa22G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa2_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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_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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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 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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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 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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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 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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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 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 = "wpa2_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"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("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa2
class TestThroughputVsPktVlan5G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa2_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa2_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa2_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa2_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa2_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa2_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa2_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa2_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa2_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False

View File

@@ -0,0 +1,578 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: Bridge Mode
pytest -m "throughput_vs_pkt and Bridge"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.Bridge, pytest.mark.wpa3,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_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],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktBridge2G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa3_personal_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa3_personal_pkt_256_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa3_personal_pkt_512_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa3_personal_pkt_1024_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa3_personal_pkt_MTU_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("Bridge MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktBridge5G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa3_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa3_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa3_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa3_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa3_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False

View File

@@ -0,0 +1,578 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: nat Mode
pytest -m "throughput_vs_pkt and nat"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.nat, pytest.mark.wpa3,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "NAT",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_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],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktNatAWpa32G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa3_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa3_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa3_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa3_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa3_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktNatOpen5G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_wpa3_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_wpa3_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_wpa3_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_wpa3_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa3_personal
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_wpa3_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 wpa3_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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

View File

@@ -0,0 +1,578 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: VLAN MODE
pytest -m "throughput_vs_pkt and vlan"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.vlan, pytest.mark.wpa3,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "VLAN",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktVlanWpa32G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa3_personal_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa3_personal_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa3_personal_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa3_personal_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa3_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa3_personal_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 wpa3_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa3
class TestThroughputVsPktVlan5G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa3_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa3_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa3_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa3_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa3_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa3_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa3_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa3_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa3_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False

View File

@@ -0,0 +1,579 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: Bridge Mode
pytest -m "throughput_vs_pkt and Bridge"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.Bridge, pytest.mark.wpa,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "BRIDGE",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_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],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktBridgeWpa2G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa_personal_pkt_142_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa_personal_pkt_256_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa_personal_pkt_512_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa_personal_pkt_1024_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa_personal_pkt_MTU_2g(self, get_vif_state,
lf_test, station_names_twog, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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": "BRIDGE",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("Bridge MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktBridgeWpa5G(object):
"""Throughput vs Various Pkt Size Test Bridge mode
pytest -m "throughput_vs_pkt and Bridge"
"""
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes Bridge Mode
pytest -m "throughput_vs_pkt and Bridge and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "BRIDGE"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False

View File

@@ -0,0 +1,577 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: nat Mode
pytest -m "throughput_vs_pkt and nat"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.nat, pytest.mark.wpa,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "NAT",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_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],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktNatAWpa2G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktNatOpen5G(object):
"""Throughput vs Various Pkt Size Test nat mode
pytest -m "throughput_vs_pkt and nat"
"""
@pytest.mark.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pkt142
def test_client_wpa_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pkt256
def test_client_wpa_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pkt512
def test_client_wpa_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pkt1024
def test_client_wpa_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa_personal
@pytest.mark.fiveg
@pytest.mark.pktMTU
def test_client_wpa_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 wpa_personal and fiveg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "NAT"
band = "fiveg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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

View File

@@ -0,0 +1,576 @@
"""
Performance Test: Throughput vs Various Pkt Size Test: VLAN MODE
pytest -m "throughput_vs_pkt and vlan"
"""
import os
import pytest
import allure
pytestmark = [pytest.mark.performance, pytest.mark.throughput_vs_pkt, pytest.mark.vlan, pytest.mark.wpa,
pytest.mark.usefixtures("setup_test_run")]
setup_params_general = {
"mode": "VLAN",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_general],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktVlanWpa2G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="60")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt142
def test_client_wpa_personal_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="142")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt256
def test_client_wpa_personal_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="256")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt512
def test_client_wpa_personal_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="512")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pkt1024
def test_client_wpa_personal_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="1024")
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.wpa_personal
@pytest.mark.twog
@pytest.mark.pktMTU
def test_client_wpa_personal_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 wpa_personal and twog"
"""
profile_data = setup_params_general["ssid_modes"]["wpa_personal"][0]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "twog"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
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, pkt_size="MTU")
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",
"ssid_modes": {
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
"security_key": "something"}]},
"rf": {},
"radius": False
}
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize(
'setup_profiles',
[setup_params_5g],
indirect=True,
scope="class"
)
@pytest.mark.usefixtures("setup_profiles")
@pytest.mark.wpa
class TestThroughputVsPktVlan5G(object):
"""Throughput vs Various Pkt Size Test vlan mode
pytest -m "throughput_vs_pkt and vlan"
"""
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt60
def test_client_wpa_personal_pkt_60_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="60")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt142
def test_client_wpa_personal_pkt_142_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="142")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt256
def test_client_wpa_personal_pkt_256_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="256")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt512
def test_client_wpa_personal_pkt_512_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="512")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pkt1024
def test_client_wpa_personal_pkt_1024_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="1024")
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_fivg)
assert station
else:
assert False
@pytest.mark.wpa_personal
@pytest.mark.fivg
@pytest.mark.pktMTU
def test_client_wpa_personal_pkt_MTU_5g(self, get_vif_state,
lf_test, station_names_fivg, create_lanforge_chamberview_dut,
get_configuration):
"""Throughput Vs Pkt Sizes VLAN MODE
pytest -m "throughput_vs_pkt and vlan and wpa_personal and fivg"
"""
profile_data = setup_params_5g["ssid_modes"]["wpa_personal"][1]
ssid_name = profile_data["ssid_name"]
security = "wpa_personal"
mode = "VLAN"
band = "fivg"
vlan = 1
dut_name = create_lanforge_chamberview_dut
if ssid_name not in get_vif_state:
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
mode=mode, band=band,
station_name=station_names_fivg, vlan_id=vlan)
if station:
dp_obj = lf_test.dataplane(station_name=station_names_fivg, mode=mode,
instance_name="TIP_PERF_DPT_WPA2_5G",
vlan_id=vlan, dut_name=dut_name, pkt_size="MTU")
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_fivg)
assert station
else:
assert False