mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 20:27:54 +00:00
Getting pass/fail from kpi.csv dual_band_performance_test
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
This commit is contained in:
@@ -1804,6 +1804,7 @@ class lf_tests(lf_libs):
|
|||||||
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
||||||
instance_name="test_demo", dut_5g="", dut_2g="", influx_tags="", move_to_influx=False,
|
instance_name="test_demo", dut_5g="", dut_2g="", influx_tags="", move_to_influx=False,
|
||||||
create_vlan=True, dut_data={}):
|
create_vlan=True, dut_data={}):
|
||||||
|
try:
|
||||||
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
|
||||||
|
|
||||||
if mode == "BRIDGE" or mode == "NAT-WAN":
|
if mode == "BRIDGE" or mode == "NAT-WAN":
|
||||||
@@ -1863,7 +1864,20 @@ class lf_tests(lf_libs):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
pass
|
pass
|
||||||
return self.dualbandptest_obj
|
report_name = self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/"
|
||||||
|
self.attach_report_graphs(report_name=report_name, pdf_name="Dual Band Performance Test")
|
||||||
|
result = self.read_kpi_file(column_name=["pass/fail"], dir_name=report_name)
|
||||||
|
allure.attach.file(source="../reports/" + report_name + "/kpi.csv",
|
||||||
|
name=f"dual_band_CSV", attachment_type=allure.attachment_type.CSV)
|
||||||
|
if result[0][0] == "PASS":
|
||||||
|
return True, "Test Passed"
|
||||||
|
else:
|
||||||
|
return False, "Test Failed"
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"{e}")
|
||||||
|
return False, f"{e}"
|
||||||
|
|
||||||
|
|
||||||
def multi_station_performance(self, ssid_name=None, security_key=None, mode="BRIDGE", vlan=1, band="twog", antenna=1,
|
def multi_station_performance(self, ssid_name=None, security_key=None, mode="BRIDGE", vlan=1, band="twog", antenna=1,
|
||||||
instance_name="", set_att_db="10db",download_rate="0Gbps",upload_rate="1Gbps",
|
instance_name="", set_att_db="10db",download_rate="0Gbps",upload_rate="1Gbps",
|
||||||
|
|||||||
Reference in New Issue
Block a user