From e642ce8419bfe9929300dc4bd472beab2e2ffcaf Mon Sep 17 00:00:00 2001 From: shivamcandela Date: Mon, 13 Sep 2021 20:25:20 +0530 Subject: [PATCH] WIFI-3909 Added test case specific logs and correlation Signed-off-by: shivamcandela --- libs/apnos/apnos.py | 44 +++++++++++++------ tests/conftest.py | 28 +++++++++++- .../test_enterprise_ttls.py | 21 ++++----- .../test_general_security_modes.py | 24 +++++----- .../test_enterprise_ttls.py | 30 ++++++++----- .../test_general_security_modes.py | 35 ++++++++++----- .../test_enterprise_ttls.py | 30 ++++++++----- .../test_general_security_modes.py | 36 ++++++++++----- tests/fixtures_2x.py | 20 ++++----- 9 files changed, 177 insertions(+), 91 deletions(-) diff --git a/libs/apnos/apnos.py b/libs/apnos/apnos.py index b4d628e09..7f5529a11 100644 --- a/libs/apnos/apnos.py +++ b/libs/apnos/apnos.py @@ -10,6 +10,9 @@ Currently Having Methods: """ import json +import string +import time +import random import paramiko from scp import SCPClient @@ -51,7 +54,7 @@ class APNOS: client = self.ssh_cli_connect() cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"' stdin, stdout, stderr = client.exec_command(cmd) - output = str(stdout.read()) + output = str(stdout.read()) print(output) if output.__contains__("False"): cmd = 'mkdir ~/cicd-git/' @@ -137,7 +140,6 @@ class APNOS: output = stdout.read() client.close() - return output # Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI @@ -305,15 +307,12 @@ class APNOS: f"cmd --value \"{cmd}\" " stdin, stdout, stderr = client.exec_command(cmd) output = stdout.read() - print(output, stderr.read()) status = output.decode('utf-8').splitlines() - error = stderr - stdin = stdin client.close() except Exception as e: print(e) - stdin, status, error = "Error", "Error", "Error" - return stdin, status, error + status = "Error" + return status def get_ucentral_status(self): try: @@ -452,7 +451,7 @@ class APNOS: band = "2G" else: band = "5G" - iwinfo_bssid_data[o[i - 1]] = [o[i+1].replace('"', ''), o[i + 4], band] + iwinfo_bssid_data[o[i - 1]] = [o[i + 1].replace('"', ''), o[i + 4], band] client.close() except Exception as e: iwinfo_bssid_data = False @@ -492,6 +491,20 @@ class APNOS: name.pop(-1) return tx_power, name + def get_logread(self, start_ref="", stop_ref=""): + data = self.logread() + log_data = [] + data = data.split("\n") + flag = 0 + for logs in data: + if logs.__contains__(start_ref): + flag = 1 + if flag == 1: + log_data.append(logs) + if logs.__contains__(stop_ref): + flag = 0 + ap_logs = "\n".join(log_data) + return ap_logs def logread(self): try: @@ -561,7 +574,7 @@ class APNOS: if __name__ == '__main__': obj = { - 'model': 'ecw5211', + 'model': 'ec420', 'mode': 'wifi5', 'serial': '001122090801', 'jumphost': True, @@ -570,10 +583,13 @@ if __name__ == '__main__': 'password': "pumpkin77", 'port': 22, 'jumphost_tty': '/dev/ttyAP3', - 'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin" + 'version': "latest" } var = APNOS(credentials=obj, sdk="2.x") - tx_power, name = var.iwinfo() - allure.attach(name="interface name: ", body=str(name)) - allure.attach(name="tx power: ", body=str(tx_power)) - print(tx_power, name) + S = 9 + instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) + var.run_generic_command(cmd="logger start testcase: " + instance_name) + time.sleep(60) + var.run_generic_command(cmd="logger stop testcase: " + instance_name) + var.get_logread(start_ref="start testcase: " + instance_name, + stop_ref="stop testcase: " + instance_name) diff --git a/tests/conftest.py b/tests/conftest.py index fd840ab2a..eb9b628a8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,8 @@ Pytest fixtures: High level Resource Management and base setup fixtures """ import datetime +import random +import string import sys import os import time @@ -257,7 +259,7 @@ def instantiate_access_point(testbed, get_apnos, get_configuration): pass else: get_apnos(access_point_info, pwd="../libs/apnos/") - # Write a code to verify Access Point Connectivity + # Write a code to verify Access Point Connectivity yield True @@ -654,3 +656,27 @@ def fixtures_ver(request, get_configuration): print("1.x") obj = Fixtures_1x(configuration=get_configuration) yield obj + + +""" +Logs related Fixtures +""" + + +@pytest.fixture(scope="function") +def get_ap_logs(request, get_apnos): + S = 9 + instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) + for ap in get_configuration['access_point']: + ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") + ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name) + + def collect_logs(): + for ap in get_configuration['access_point']: + ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") + ap_ssh.run_generic_command(cmd="logger stop testcase: " + instance_name) + ap_logs = ap_ssh.get_logread(start_ref="start testcase: " + instance_name, + stop_ref="stop testcase: " + instance_name) + allure.attach(name='logread', body=str(ap_logs)) + pass + request.addfinalizer(collect_logs) diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py index 7647e75cd..d475e9418 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py @@ -45,7 +45,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_vif_state, + def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -72,7 +72,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa_enterprise_5g(self, station_names_fiveg, get_ap_logs, + setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 5g pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_enterprise and fiveg" @@ -97,7 +98,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_vif_state, + def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -126,7 +127,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_vif_state, + def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -155,7 +156,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.uc_sanity @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_vif_state, + def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -183,7 +184,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): @pytest.mark.uc_sanity @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, get_vif_state, + def test_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -241,7 +242,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state, + def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -269,7 +270,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state, + def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -297,7 +298,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state, + def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -324,7 +325,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state, + def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, exit_on_fail, test_cases, radius_info): diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py index 34dac56b6..15286e789 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py @@ -49,7 +49,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") - def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_open_ssid_2g(self, get_vif_state, get_ap_logs, setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog, test_cases): """Client Connectivity open ssid 2.4G @@ -75,7 +75,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.fiveg @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg, + def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report): """Client Connectivity open ssid 5G pytest -m "client_connectivity and bridge and general and open and fiveg" @@ -102,7 +102,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report, + def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G pytest -m "client_connectivity and bridge and general and wpa and twog" @@ -128,7 +128,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg, + def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and bridge and general and wpa and fiveg" @@ -154,7 +154,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases, + def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G pytest -m "client_connectivity and bridge and general and wpa2_personal and twog" @@ -180,7 +180,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases, + def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report, test_cases, station_names_fiveg, lf_test): """Client Connectivity wpa2_personal ssid 5G @@ -244,7 +244,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): """Client Connectivity open ssid 2.4G @@ -270,7 +270,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and bridge and general and wpa3_personal and fiveg" @@ -295,7 +295,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -322,7 +322,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, + def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -348,7 +348,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -376,7 +376,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and fiveg" diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py index 7956efc43..1a14676f7 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py @@ -33,7 +33,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] ssid_name = profile_data["ssid_name"] @@ -57,7 +58,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] ssid_name = profile_data["ssid_name"] @@ -83,7 +85,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] ssid_name = profile_data["ssid_name"] @@ -109,7 +112,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] ssid_name = profile_data["ssid_name"] @@ -134,7 +138,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa3_enterprise @pytest.mark.twog @pytest.mark.uc_sanity - def test_wpa3_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] ssid_name = profile_data["ssid_name"] @@ -158,7 +163,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @pytest.mark.uc_sanity - def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, get_ap_logs, + setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] ssid_name = profile_data["ssid_name"] @@ -207,7 +213,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] ssid_name = profile_data["ssid_name"] @@ -231,7 +238,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, + def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] ssid_name = profile_data["ssid_name"] @@ -255,7 +263,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] ssid_name = profile_data["ssid_name"] @@ -278,7 +287,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, exit_on_fail, test_cases, radius_info): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py index f0f98b1f3..2c91a1d43 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py @@ -48,7 +48,8 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_open_ssid_2g(self, get_vif_state, get_ap_logs, + setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog, test_cases): """Client Connectivity open ssid 2.4G @@ -76,7 +77,8 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg, + def test_open_ssid_5g(self, get_vif_state, get_ap_logs, + get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report): """Client Connectivity open ssid 5G pytest -m "client_connectivity and NAT and general and open and fiveg" @@ -102,7 +104,7 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report, + def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G pytest -m "client_connectivity and NAT and general and wpa and twog" @@ -127,7 +129,8 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg, + def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, + lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and NAT and general and wpa and fiveg" @@ -153,7 +156,8 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases, + def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, + get_lanforge_data, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G pytest -m "client_connectivity and NAT and general and wpa2_personal and twog" @@ -179,7 +183,8 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases, + def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, + get_lanforge_data, update_report, test_cases, station_names_fiveg, lf_test): """Client Connectivity wpa2_personal ssid 5G @@ -241,7 +246,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): """Client Connectivity open ssid 2.4G @@ -267,7 +273,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and NAT and general and wpa3_personal and fiveg" @@ -292,7 +299,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -319,7 +327,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, + def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -345,7 +354,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -373,7 +383,8 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and fiveg" diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py index 0b0e70a20..f0b518851 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py @@ -33,7 +33,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] @@ -58,7 +59,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, + def test_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] @@ -85,7 +87,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] @@ -112,7 +115,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, + def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] @@ -138,7 +142,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa3_enterprise @pytest.mark.twog @pytest.mark.uc_sanity - def test_wpa3_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] @@ -163,7 +168,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @pytest.mark.uc_sanity - def test_wpa3_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] @@ -213,7 +219,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] @@ -238,7 +245,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, + def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] @@ -263,7 +271,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] @@ -287,7 +296,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, + def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report, exit_on_fail, test_cases, radius_info): diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py index 5528f6322..a899bf0d9 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py @@ -46,7 +46,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report, + def test_open_ssid_2g(self, get_vif_state, get_ap_logs, + setup_profiles, get_lanforge_data, lf_test, update_report, station_names_twog, test_cases): """Client Connectivity open ssid 2.4G @@ -71,7 +72,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg, + def test_open_ssid_5g(self, get_vif_state, get_ap_logs, + get_lanforge_data, lf_test, test_cases, station_names_fiveg, update_report): """Client Connectivity open ssid 5G pytest -m "client_connectivity and vlan and general and open and fiveg" @@ -97,7 +99,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report, + def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, + get_lanforge_data, update_report, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G pytest -m "client_connectivity and vlan and general and wpa and twog" @@ -123,7 +126,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg, + def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, + lf_test, update_report, test_cases, station_names_fiveg, get_lanforge_data): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and vlan and general and wpa and fiveg" @@ -149,7 +153,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases, + def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, + get_lanforge_data, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G pytest -m "client_connectivity and vlan and general and wpa2_personal and twog" @@ -175,7 +180,8 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases, + def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, + get_lanforge_data, update_report, test_cases, station_names_fiveg, lf_test): """Client Connectivity wpa2_personal ssid 5G @@ -238,7 +244,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test, + def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): """Client Connectivity open ssid 2.4G @@ -265,7 +272,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and vlan and general and wpa3_personal and fiveg" @@ -290,7 +298,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -317,7 +326,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, + def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -343,7 +353,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, + def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, + station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report, test_cases): @@ -371,7 +382,8 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, + def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, + station_names_fiveg, get_lanforge_data, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G pytest -m "client_connectivity and vlan and general and wpa_wpa2_personal_mixed and fiveg" diff --git a/tests/fixtures_2x.py b/tests/fixtures_2x.py index 564025eb6..8e1f36580 100644 --- a/tests/fixtures_2x.py +++ b/tests/fixtures_2x.py @@ -1,4 +1,7 @@ """ Python Inbuilt Libraries """ +import random +import string + import allure import pytest import sys @@ -240,6 +243,9 @@ class Fixtures_2x: ap_logs = ap_ssh.logread() allure.attach(body=ap_logs, name="FAILURE: AP LOgs: ") pytest.fail("AP is disconnected from UC Gateway") + S = 9 + instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) + ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name) instantiate_profile_obj.push_config(serial_number=get_equipment_id[0]) time_1 = time.time() config = json.loads(str(instantiate_profile_obj.base_profile_config).replace(" ", "").replace("'", '"')) @@ -316,8 +322,10 @@ class Fixtures_2x: # allure.attach(name="tx power: ", body=str(tx_power)) except: pass - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="AP Logs: ") + ap_ssh.run_generic_command(cmd="logger stop testcase: " + instance_name) + ap_logs = ap_ssh.get_logread(start_ref="start testcase: " + instance_name, + stop_ref="stop testcase: " + instance_name) + allure.attach(body=ap_logs, name="AP Log: ") @@ -356,15 +364,7 @@ class Fixtures_2x: pass def teardown_session(): - iwinfo = ap_ssh.iwinfo() - allure.attach(name="iwinfo: ", body=str(iwinfo)) - # tx_power, name = ap_ssh.gettxpower() - # allure.attach(name="interface name: ", body=str(name)) - # allure.attach(name="tx power: ", body=str(tx_power)) - - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="AP Logs after test completion") print("\nTeardown") request.addfinalizer(teardown_session)